Skip to content

Generate and push OpenTelemetry Trace data to an OTEL collector in JSON format

License

Notifications You must be signed in to change notification settings

agardnerIT/tracepusher

Repository files navigation

OpenTelemetry tracepusher

Generate and push OpenTelemetry Trace data to an endpoint in JSON format.

architecture trace

Watch: tracepusher in Action

YouTube: tracepusher tracing a GitLab pipeline.

If you like tracepusher and want to do the same thing with logs, check out logpusher.

Uses

Try In Browser

See try tracepusher in-browser without installation.

Standalone Binary

See download and use tracepusher as a standalone binary

Python3 Usage

See use tracepusher as a Python script.

Docker Usage

See use tracepusher as a docker image.

CI Usage

See run a CI pipeline step as a docker image with tracepusher.

Dry Run Mode

See dry run mode flag.

Debug Mode

See debug mode flag.

Time Shifting

See time shifting.

Complex Tracing (Sub Span support)

See multi-span traces.

Span Attributes

Only supported with v0.6.0 and above.

See span attribute types.

Span Events

Only supported with v0.7.0 and above.

See span events.

Span Kind

Only supported with v0.8.0 and above.

See span kind

Span Duration and Duration Type

Only supported with v0.8.0 and above.

tracepusher will generate spans of n seconds.

This behaviour can be overridden by using the --duration-type parameter.

See duration type page.

Span Status

Only supported with v0.9.0 and above.

tracepusher users can set the status of the span (OK, ERROR or UNSET).

Default is OK.

See span status page.

Insecure flag

Only supported with v0.9.0 and above.

tracepusher users can set --insecure [false|true] to allow sending spans to http:// vs. https:// endpoints.

Defaults to false but behaviour differs by version.

See insecure flag for more info.

Start Time

Only supported with v0.10.0 and above.

tracepusher users can (optionally) set the span start time using the --start-time flag. If unset, defaults to now.

See start time flag for more info.

Spin up OpenTelemetry Collector

See OpenTelemetry Collector configuration

Adopters

Do you use tracepusher? Thanks and we'd love to know!

Submit a PR and add your details to ADOPTERS.md

FAQs

See FAQ.

Breaking Changes

See Breaking changes

Building Standalone Binaries

Note: PyInstaller is platform dependent. You must build on whatever platform you wish to run tracepusher on.

When tracepusher is released, the build_standalone_binaries.yml workflow completes this step and uploads the resulting binaries to S3 where we (currently manually) attach each generated binary to the release notes.

python -m PyInstaller --onefile tracepusher.py

Building Docker Image

Run all build commands from the root directory:

docker buildx build --platform linux/arm64,linux/amd64 --push -t tracepusher:dev-ci -f ./docker/ci/Dockerfile .
docker buildx build --platform linux/arm64,linux/amd64 --push -t tracepusher:dev -f ./docker/standard/Dockerfile .

Install Requirements

For Non-Developers

pip install -r requirements.txt

For Developers

pip install -r requirements-dev.txt

Testing

Run the test suite:

pytest

Contributing

All contributions are most welcome!

Get involved:

  • Tackle a good first issue
  • Create an issue to suggest something new
  • File a PR to fix something

Made with contrib.rocks.