datadog-trace-agent

module
v0.0.0-...-e57142c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2019 License: BSD-3-Clause

README

Datadog APM agent

CircleCI

An agent that collects traces from various sources, normalizes and pre-processes them before sending the info to the Datadog backend.

Run on Linux

The Trace Agent is packaged with the standard Datadog Agent. Just run the Datadog Agent.

Note: the Trace Agent is not yet included in the installation from source of the Trace Agent. Follow the instructions in Development to do it manually.

Run on macOS

The APM agent (aka Trace Agent) isn't part of the OSX Datadog Agent yet, it needs to be run manually on the side.

  • Have the OSX Datadog Agent.

  • Download the latest OSX Trace Agent release.

  • Run the Trace Agent using the Datadog Agent configuration.

    ./trace-agent-X.Y.Z-darwin-amd64 -config /opt/datadog-agent/etc/datadog.yaml

  • The Trace Agent should now be running in foreground, with an initial output similar to:

2017-04-24 13:46:35 INFO (main.go:166) - Loaded configuration: /opt/datadog-agent/etc/datadog.yaml
2017-04-24 13:46:36 INFO (agent.go:200) - Failed to parse hostname from dd-agent config
2017-04-24 13:46:36 DEBUG (agent.go:288) - No aggregator configuration, using defaults
2017-04-24 13:46:36 INFO (main.go:220) - trace-agent running on host My-MacBook-Pro.local
2017-04-24 13:46:36 INFO (receiver.go:137) - listening for traces at http://localhost:8126

Run on Windows

On Windows, the trace agent is shipped together with the Datadog Agent only since version 5.19.0, so users must update to 5.19.0 or above. However the Windows trace agent is in beta and some manual steps are required.

Update your config file to include:

[Main]
apm_enabled: yes
[trace.config]
log_file = C:\ProgramData\Datadog\logs\trace-agent.log

Restart the datadogagent service:

net stop datadogagent
net start datadogagent

For this beta the trace agent status and logs are not displayed in the Agent Manager GUI.

To see the trace agent status either use the Service tab of the Task Manager or run:

sc.exe query datadog-trace-agent

And check that the status is "running".

Note: the Trace Agent is not yet included in the installation from source of the Trace Agent. Follow the instructions in Development to do it manually.

Development

First, make sure Go 1.10+ is installed. You can do this by following the steps on the official website.

Then, download (or update) the latest source by running:

go get -u github.com/DataDog/datadog-trace-agent/...

Navigate to the download location and install the trace-agent binary in $GOPATH/bin:

cd $GOPATH/src/github.com/DataDog/datadog-trace-agent
make install

You may now run the agent using $GOPATH/bin/trace-agent.

Testing

  • We use golint to lint our source code.
  • You may also run the CI locally using the CircleCI CLI: circleci build.
  • To run only the tests, simply run go test ./...

Contributing

See our contributing guidelines

More detailed information about agent configuration, terminology and architecture can be found in our wiki

Directories

Path Synopsis
cmd
internal
api
event
Package event contains functionality related to APM event extraction from traces.
Package event contains functionality related to APM event extraction from traces.
metrics
Package metrics exposes utilities for setting up and using a sub-set of Datadog's dogstatsd client.
Package metrics exposes utilities for setting up and using a sub-set of Datadog's dogstatsd client.
obfuscate
Package obfuscate implements quantizing and obfuscating of tags and resources for a set of spans matching a certain criteria.
Package obfuscate implements quantizing and obfuscating of tags and resources for a set of spans matching a certain criteria.
pb
Package pb contains the data structures used by the trace agent to communicate with tracers and the Datadog API.
Package pb contains the data structures used by the trace agent to communicate with tracers and the Datadog API.
quantile
Package quantile implements "Space-Efficient Online Computation of Quantile Summaries" (Greenwald, Khanna 2001): http://infolab.stanford.edu/~datar/courses/cs361a/papers/quantiles.pdf
Package quantile implements "Space-Efficient Online Computation of Quantile Summaries" (Greenwald, Khanna 2001): http://infolab.stanford.edu/~datar/courses/cs361a/papers/quantiles.pdf
sampler
Package sampler contains all the logic of the agent-side trace sampling
Package sampler contains all the logic of the agent-side trace sampling
test
Package test provides utilities for running integration tests on the trace agent.
Package test provides utilities for running integration tests on the trace agent.
test/testutil
Package testutil provides easy ways to generate some random or deterministic data that can be use for tests or benchmarks.
Package testutil provides easy ways to generate some random or deterministic data that can be use for tests or benchmarks.
traceutil
Package traceutil contains functions for extracting and processing traces.
Package traceutil contains functions for extracting and processing traces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL