Built-in Configuration
Built-in Configuration
Orchestrion includes built-in configuration that automatically instruments many libraries using the
Datadog tracing library, .
These automated instrumentations are modeled as aspects, which are the combination of:
- a join point, which is a standardized description of the location where instrumentation code is to be added,
- one or more advice, which describe the modifications to be made.
The following pages highlights what libraries are supported, how instrumentation is achieved, and any caveats or limitations to be aware of:
Create a span surrounding all calls to the annotated function by adding a //dd:span directive on the function declaration. The default operation (span) name is the name of the function, but this can be overridden by specifying a span.name argument:
//dd:span span.name:custom-operation-name other:tag func myFunction() { // The default operation name would have been "myFunction" } Function literal expressions don’t have a function name, and their default operation name is the value of the very first directive argument (if there is one). If there are no directive arguments, the operation name will remain blank.
//dd:span other:tag span.name:custom-operation-name myOp := func() { // The default operation name would have been "tag" }
Flip a boolean to true if Orchestrion is enabled.
Package pubsub provides an easy way to publish and receive Google Cloud Pub/Sub messages, hiding the details of the underlying server RPCs
A generic interface around SQL (or SQL-like) databases.
The entry point of a Go program.
gqlgen is a Go library for building GraphQL servers without any fuss.
The official AWS SDK for Go
AWS SDK for the Go programming language.
confluent-kafka-go is a Go library for Apache Kafka
The official Go client for Elasticsearch
Gin is a web framework written in Go.
chi is a lightweight, idiomatic and composable router for building Go HTTP services.
Redis client for Go.
Package gocql implements a fast and robust Cassandra client for the Go programming language.
An Express inspired web framework built on Fasthttp, the fastest HTTP engine for Go.
Redigo is a Go client for the Redis database.
Package gorilla/mux implements a request router and dispatcher for matching incoming requests to their respective handler.
The goal of this project is to provide full support of the October 2021 GraphQL specification with a set of idiomatic, easy to use Go packages.
An implementation of GraphQL in Go. Follows the official reference implementation graphql-js.
Official package for interacting with a Vault server.
Sarama is a Go library for Apache Kafka
PostgreSQL driver and toolkit for Go.
A high performance HTTP request router that scales well.
High performance, extensible, minimalist Go web framework.
Kafka library in Go
Sarama is a Go library for Apache Kafka
Structured, pluggable logging for Go.
A simple RPC framework with protobuf service definitions.
Details & Caveats This instrumentation currently uses the wrappers from the dd-trace-go contrib/net/http package, not the ones from contrib/twitchtv/twirp. The server-side instrumentation additionally adds rpc / twirp specific spans using *twirp.ServerHooks. Currently, the *twirp.ClientHooks implementation is not available in dd-trace-go, so the only generated spans are the ones from net/http.
Official Golang driver for MongoDB.
The Go implementation of gRPC.
The fantastic ORM library for Golang.
Go client for Kubernetes.
Package slog provides structured logging, in which log records include a message, a severity level, and various other attributes expressed as key-value pairs.
HTTP client implementation.
HTTP server implementation.
Protection from Local File Inclusion (LFI) Attacks
All known functions that open files are susceptible to Local File Inclusion (LFI) attacks. This aspect protects against LFI attacks by wrapping the os.OpenFile function with a security operation that will block the operation if it is deemed unsafe.
Instrumenting only the os.OpenFile function is sufficient to protect against LFI attacks, as all other functions in the os package that open files ultimately call os.OpenFile (as of Go 1.23).
Operations that interact with Go’s runtime system.
Testing instrumentation
Last updated on