Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revendor #732

Merged
merged 4 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Trickster is a fully-featured HTTP Reverse Proxy Cache for HTTP applications lik
* [Negative Caching](./docs/negative-caching.md) to prevent domino effect outages
* High-performance [Collapsed Forwarding](./docs/collapsed-forwarding.md)
* Best-in-class [Byte Range Request caching and acceleration](./docs/range_request.md).
* [Distributed Tracing](./docs/tracing.md) via OpenTelemetry, supporting Jaeger and Zipkin
* [Distributed Tracing](./docs/tracing.md) via OpenTelemetry, supporting OTLP and Zipkin
* Rules engine for custom request routing and rewriting

## Time Series Database Accelerator
Expand Down
31 changes: 19 additions & 12 deletions deploy/kube/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -505,24 +505,31 @@ data:
# default:

# # provider specifies the type of backend tracing system where traces are sent (in that format)
# # options are: jaeger, zipkin, stdout or none. none is the default
# # options are: otlp, zipkin, stdout or none. none is the default
# provider: none

# # service_name specifies the service name under which the traces are registered by this tracer
# # default is trickster
# service_name: trickster

# # collector_url is the URL of the tracing backend
# # required for zipkin and jaeger, unused for stdout
# collector_url: http://jaeger:14268/api/traces
# # endpoint is the URL, URI or Path to the tracing backend
# # required for Zipkin and OTLP, unused for stdout
# endpoint: http://jaeger:14268/api/traces

# # collector_user is the username credential for authenticating with the tracing backend
# # optional jaeger; unused for zipkin and stdout
# collector_user: ''
# # timeout_ms is the amount of time in milliseconds for the tracing post
# # to wait for a response before timing out
# # default is no timeout set
# timeout_ms: 5000

# # collector_pass is the username credential for authenticating with the tracing backend
# # optional jaeger; unused for zipkin and stdout
# collector_pass: ''
# # headers is a list of http headers to include in the tracing post
# # default is none
# headers:
# "Header-Name-1": "header value 1"
# "Header-Name-2": "header value 2"

# # disable_compression should be set to true if tracing posts should not be compressed
# # default is false
# disable_compression: false

# # sample_rate sets the probability that a span will be recorded.
# # A floating point value of 0.0 to 1.0 (inclusive) is permitted
Expand Down Expand Up @@ -556,15 +563,15 @@ data:
# # another example tracing config named example using jaeger agent backend and a 50% sample rate
# example:
# provider: jaeger
# collector_url: jaeger:6831
# endpoint: jaeger:6831
# sample_rate: 0.5
# jaeger:
# endpoint_type: agent

# # another example tracing config named zipkin-example using zipkin backend and a 10% sample rate
# zipkin-example:
# provider: zipkin
# collector_url: https://zipkin.example.com:9411/api/v2/spans
# endpoint: https://zipkin.example.com:9411/api/v2/spans
# sample_rate: 0.1


Expand Down
10 changes: 4 additions & 6 deletions docs/chunked_caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,16 @@ rules:

tracing:
jc1:
tracer_type: jaeger
collector_url: 'http://127.0.0.1:14268/api/traces'
tracer_type: otlp
endpoint: 'http://127.0.0.1:14268/api/traces'
tags:
testTag: testTagValue
testTag2: testTag2Value
ja1:
tracer_type: jaeger
collector_url: '127.0.0.1:6831'
tracer_type: otlp
endpoint: '127.0.0.1:6831'
omit_tags:
- http.url
jaeger:
endpoint_type: agent

backends:
prom1:
Expand Down
103 changes: 0 additions & 103 deletions docs/developer/tracing.md

This file was deleted.

5 changes: 2 additions & 3 deletions docs/tracing.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Distributed Tracing via OpenTelemetry

Trickster instruments Distributed Tracing with [OpenTelemetry](http://opentelemetry.io/), which is a currently emergent, comprehensive observability stack that is in Public Beta. We import the [OpenTelemetry golang packages](https://github.com/open-telemetry/opentelemetry-go) to instrument support for tracing.
Trickster instruments Distributed Tracing with [OpenTelemetry](http://opentelemetry.io/). We import the [OpenTelemetry golang packages](https://github.com/open-telemetry/opentelemetry-go) to instrument support for tracing.

As OpenTelemetry evolves to support additional exporter formats, we will work to extend Trickster to support those as quickly as possible. We also make a best effort to update our otel package imports to the latest releases, whenever we publish a new Trickster release. You can check the [go.mod](../go.mod) file to see which release of opentelemetry-go we are is using. In this view, to see which version of otel a specific Trickster release imports, use the branch selector dropdown to switch to the tag corresponding to that version of Trickster.

## Supported Tracing Backends

- Jaeger
- Jaeger Agent
- Jaeger (via OTLP)
- Zipkin
- Console/Stdout (printed locally by the Trickster process)

Expand Down
43 changes: 21 additions & 22 deletions examples/conf/example.full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,24 +601,31 @@ backends:
# default:

# # provider specifies the type of backend tracing system where traces are sent (in that format)
# # options are: jaeger, zipkin, stdout or none. none is the default
# # options are: otlp, zipkin, stdout or none. none is the default
# provider: none

# # service_name specifies the service name under which the traces are registered by this tracer
# # default is trickster
# service_name: trickster

# # collector_url is the URL of the tracing backend
# # required for zipkin and jaeger, unused for stdout
# collector_url: http://jaeger:14268/api/traces
# # endpoint is the URL, URI or Path to the tracing backend
# # required for Zipkin and OTLP, unused for stdout
# endpoint: http://jaeger:14268/api/traces

# # collector_user is the username credential for authenticating with the tracing backend
# # optional jaeger; unused for zipkin and stdout
# collector_user: ''
# # timeout_ms is the amount of time in milliseconds for the tracing post
# # to wait for a response before timing out
# # default is no timeout set
# timeout_ms: 5000

# # collector_pass is the username credential for authenticating with the tracing backend
# # optional jaeger; unused for zipkin and stdout
# collector_pass: ''
# # headers is a list of http headers to include in the tracing post
# # default is none
# headers:
# "Header-Name-1": "header value 1"
# "Header-Name-2": "header value 2"

# # disable_compression should be set to true if tracing posts should not be compressed
# # default is false
# disable_compression: false

# # sample_rate sets the probability that a span will be recorded.
# # A floating point value of 0.0 to 1.0 (inclusive) is permitted
Expand All @@ -637,30 +644,22 @@ backends:
# key1: "value1"
# key2: "value2"

# # configurations for this tracer, specific to jaeger
# jaeger:
# # endpoint_type indicates whether the jaeger tracing backend is a collector or agent
# # default is collector
# endpoint_type: collector

# # configurations for this tracer, specific to stdout
# stdout:
# # pretty_print indicates whether the output to stdout is formatted better human readability
# # default is false
# pretty_print: false

# # another example tracing config named example using jaeger agent backend and a 50% sample rate
# # another example tracing config named example using otlp agent backend and a 50% sample rate
# example:
# provider: jaeger
# collector_url: jaeger:6831
# provider: otlp
# endpoint: jaeger:6831
# sample_rate: 0.5
# jaeger:
# endpoint_type: agent

# # another example tracing config named zipkin-example using zipkin backend and a 10% sample rate
# zipkin-example:
# provider: zipkin
# collector_url: https://zipkin.example.com:9411/api/v2/spans
# endpoint: https://zipkin.example.com:9411/api/v2/spans
# sample_rate: 0.1


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ tracing:
pretty_print: true
zip1:
provider: zipkin
collector_url: 'http://zipkin:9411/api/v2/spans'
endpoint: 'http://zipkin:9411/api/v2/spans'
jc1:
provider: jaeger # jaeger collector
collector_url: 'http://jaeger:14268/api/traces'
provider: otlp # jaeger collector
endpoint: 'http://jaeger:14268/api/traces'
ja1:
provider: jaeger # jaeger agent
collector_url: 'jaeger:6831'
jaeger:
endpoint_type: agent
provider: otlp # jaeger agent
endpoint: 'jaeger:6831'
backends:
prom1: # prometheus cached with a memory cache, traces sent to stdout
provider: prometheus
Expand Down
55 changes: 32 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,63 @@ require (
github.com/go-redis/redis v6.15.9+incompatible
github.com/go-stack/stack v1.8.1
github.com/golang/snappy v0.0.4
github.com/influxdata/influxdb v1.11.5
github.com/influxdata/influxdb v1.11.6
github.com/influxdata/influxql v1.2.0
github.com/klauspost/compress v1.17.8
github.com/prometheus/client_golang v1.19.1
github.com/klauspost/compress v1.17.9
github.com/prometheus/client_golang v1.20.0
github.com/prometheus/common/sigv4 v0.1.0
github.com/tinylib/msgp v1.1.9
github.com/tinylib/msgp v1.2.0
github.com/trickstercache/mockster v1.1.2
go.etcd.io/bbolt v1.3.10
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.51.0
go.opentelemetry.io/otel v1.26.0
go.opentelemetry.io/otel/exporters/jaeger v1.17.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0
go.opentelemetry.io/otel/exporters/zipkin v1.26.0
go.opentelemetry.io/otel/sdk v1.26.0
go.opentelemetry.io/otel/trace v1.26.0
golang.org/x/net v0.25.0
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.53.0
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0
go.opentelemetry.io/otel/exporters/zipkin v1.28.0
go.opentelemetry.io/otel/sdk v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
golang.org/x/net v0.28.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 // indirect
github.com/aws/aws-sdk-go v1.53.5 // indirect
github.com/aws/aws-sdk-go v1.55.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/glog v1.2.1 // indirect
github.com/golang/glog v1.2.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/gomodule/redigo v1.8.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/yuin/gopher-lua v1.1.0 // indirect
go.opentelemetry.io/otel/metric v1.26.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
)
Loading
Loading