datadog-trace-agent

module
v0.0.0-...-080cdf5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2018 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-darwin-amd64-X.Y.Z -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.9+ 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
Package fixtures provides easy ways to generate some random or deterministic data that can be use for tests or benchmarks.
Package fixtures provides easy ways to generate some random or deterministic data that can be use for tests or benchmarks.
Package model is a generated protocol buffer package.
Package model is a generated protocol buffer package.
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.
Package sampler contains all the logic of the agent-side trace sampling
Package sampler contains all the logic of the agent-side trace sampling

Jump to

Keyboard shortcuts

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