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

fix: enable datadog tracer #3431

Merged
merged 4 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .docker/Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /go/src/github.com/ory/hydra
RUN mkdir -p ./internal/httpclient

COPY go.mod go.sum ./
COPY internal/httpclient/go.* ./internal/httpclient
COPY internal/httpclient/go.* ./internal/httpclient/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without a trailing slash, it will fail.

Step 6/21 : COPY internal/httpclient/go.* ./internal/httpclient
When using COPY with more than one source file, the destination must be a directory and end with a /
make: *** [docker] Error 1


ENV GO111MODULE on
ENV CGO_ENABLED 1
Expand Down Expand Up @@ -42,5 +42,3 @@ USER ory

ENTRYPOINT ["hydra"]
CMD ["serve"]


7 changes: 5 additions & 2 deletions quickstart-tracing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
# - TRACING_SERVICE_NAME="Ory Hydra"
- TRACING_PROVIDER=jaeger
# - TRACING_PROVIDER=zipkin
# - TRACING_PROVIDER=datadog
# - TRACING_PROVIDER=otel # datadog
# - TRACING_PROVIDER=elastic-apm
### Jaeger ###
- TRACING_PROVIDERS_JAEGER_SAMPLING_SERVER_URL=http://jaeger:5778/sampling
Expand All @@ -33,7 +33,9 @@ services:
# - TRACING_PROVIDERS_ZIPKIN_SERVER_URL=http://zipkin:9411/api/v2/spans
### DataDog ###
### See env vars here: https://docs.datadoghq.com/tracing/setup/go/#configuration) ###
# - DD_SERVICE=Hydra
# - TRACING_PROVIDERS_OTLP_INSECURE=true
# - TRACING_PROVIDERS_OTLP_SAMPLING_SAMPLING_RATIO=1.0
# - TRACING_PROVIDERS_OTLP_SERVER_URL=localhost:4318
### Elastic APM ###
### See env vars here: https://www.elastic.co/guide/en/apm/agent/go/1.x/configuration.html) ###
# - ELASTIC_APM_SERVER_URL="http://apm-server:8200"
Expand Down Expand Up @@ -61,3 +63,4 @@ services:
# - DD_API_KEY=<YOUR_API_KEY> # Replace it with your DataDog API key
# - DD_APM_ENABLED=true
# - DD_APM_NON_LOCAL_TRAFFIC=true
# - DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT=0.0.0.0:4318
149 changes: 1 addition & 148 deletions spec/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1022,154 +1022,7 @@
"examples": ["cpu"]
},
"tracing": {
"type": "object",
"additionalProperties": false,
"description": "Ory Hydra supports distributed tracing.",
"properties": {
"provider": {
"type": "string",
"description": "Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin DataDog, Elastic APM and Instana. If omitted or empty, tracing will be disabled. Use environment variables to configure DataDog (see https://docs.datadoghq.com/tracing/setup/go/#configuration).",
"enum": [
"jaeger",
"zipkin",
"datadog",
"elastic-apm",
"instana",
"otel"
],
"examples": ["jaeger"]
},
"service_name": {
"type": "string",
"description": "Specifies the service name to use on the tracer.",
"examples": ["Ory Hydra"]
},
"providers": {
"type": "object",
"additionalProperties": false,
"properties": {
"jaeger": {
"type": "object",
"additionalProperties": false,
"description": "Configures the jaeger tracing backend.",
"properties": {
"local_agent_address": {
"type": "string",
"description": "The address of the jaeger-agent where spans should be sent to.",
"oneOf": [
{
"pattern": "^\\[(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))]:([0-9]*)$"
},
{
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}:([0-9]*)$"
},
{
"format": "uri"
}
],
"examples": ["127.0.0.1:6831"]
},
"propagation": {
"type": "string",
"description": "The tracing header format",
"examples": ["jaeger"]
},
"max_tag_value_length": {
"type": "integer",
"description": "The value passed to the max tag value length that has been configured.",
"minimum": 0
},
"sampling": {
"type": "object",
"propertyNames": {
"enum": ["type", "value", "server_url"]
},
"allOf": [
{
"oneOf": [
{
"properties": {
"type": {
"description": "The type of the sampler you want to use.",
"const": "const"
},
"value": {
"type": "integer",
"description": "The value passed to the sampler type that has been configured.",
"minimum": 0,
"maximum": 1
}
}
},
{
"properties": {
"type": {
"description": "The type of the sampler you want to use.",
"const": "rateLimiting"
},
"value": {
"type": "integer",
"description": "The value passed to the sampler type that has been configured.",
"minimum": 0
}
}
},
{
"properties": {
"type": {
"description": "The type of the sampler you want to use.",
"const": "probabilistic"
},
"value": {
"type": "number",
"description": "The value passed to the sampler type that has been configured.",
"minimum": 0,
"maximum": 1
}
}
}
]
},
{
"properties": {
"server_url": {
"type": "string",
"description": "The address of jaeger-agent's HTTP sampling server",
"format": "uri"
}
}
}
],
"examples": [
{
"type": "const",
"value": 1,
"server_url": "http://localhost:5778/sampling"
}
]
}
}
},
"zipkin": {
"type": "object",
"additionalProperties": false,
"description": "Configures the zipkin tracing backend.",
"properties": {
"server_url": {
"type": "string",
"description": "The address of Zipkin server where spans should be sent to.",
"format": "uri"
}
},
"examples": [
{
"server_url": "http://localhost:9411/api/v2/spans"
}
]
}
}
}
}
"$ref": "ory://tracing-config"
alnr marked this conversation as resolved.
Show resolved Hide resolved
},
"sqa": {
"type": "object",
Expand Down