Skip to content

Commit

Permalink
feat: copy in tracing schema
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Jan 13, 2023
1 parent 951200a commit ddda29c
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 7 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ require (
github.com/ory/jsonschema/v3 v3.0.7
github.com/ory/ladon v1.1.0
github.com/ory/viper v1.7.5
github.com/ory/x v0.0.529
github.com/ory/x v0.0.532
github.com/pborman/uuid v1.2.1
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -222,7 +222,7 @@ require (
github.com/spf13/viper v1.12.0 // indirect
github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/toqueteos/webbrowser v1.2.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,8 @@ github.com/ory/x v0.0.93/go.mod h1:lfcTaGXpTZs7IEQAW00r9EtTCOxD//SiP5uWtNiz31g=
github.com/ory/x v0.0.110/go.mod h1:DJfkE3GdakhshNhw4zlKoRaL/ozg/lcTahA9OCih2BE=
github.com/ory/x v0.0.128/go.mod h1:ykx1XOsl9taQtoW2yNvuxl/feEfTfrZTcbY1U7841tI=
github.com/ory/x v0.0.162/go.mod h1:sj3z/MeCrAyNFFTfN6yK1nTmHXGSFnw+QwIIQ/Rowec=
github.com/ory/x v0.0.529 h1:4E4i0XpIZaZxnkKZfzIZvXWhk+qAIPEpEy78tcyXeVM=
github.com/ory/x v0.0.529/go.mod h1:XBqhPZRppPHTxtsE0l0oI/B2Onf1QJtMRGPh3CpEpA0=
github.com/ory/x v0.0.532 h1:4KBm/CEJb+tkvVoZ6Sq7e9j/HO4y14+SSsvSytxXSe8=
github.com/ory/x v0.0.532/go.mod h1:XBqhPZRppPHTxtsE0l0oI/B2Onf1QJtMRGPh3CpEpA0=
github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
Expand Down Expand Up @@ -1533,8 +1533,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/tidwall/gjson v1.3.2/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
Expand Down
145 changes: 144 additions & 1 deletion spec/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,150 @@
}
},
"tracing": {
"$ref": "https://raw.githubusercontent.com/ory/x/master/otelx/config.schema.json"
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "ory://tracing-config",
"type": "object",
"additionalProperties": false,
"description": "Configure distributed tracing using OpenTelemetry",
"properties": {
"provider": {
"type": "string",
"description": "Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin, and OTEL.",
"enum": ["jaeger", "otel", "zipkin"],
"examples": ["jaeger"]
},
"service_name": {
"type": "string",
"description": "Specifies the service name to use on the tracer.",
"examples": ["Ory Oathkeeper"]
},
"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.",
"anyOf": [
{
"title": "IPv6 Address and Port",
"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]*)$"
},
{
"title": "IPv4 Address and Port",
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}:([0-9]*)$"
},
{
"title": "Hostname and Port",
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]):([0-9]*)$"
}
],
"examples": ["127.0.0.1:6831"]
},
"sampling": {
"type": "object",
"propertyNames": {
"enum": ["server_url", "trace_id_ratio"]
},
"additionalProperties": false,
"properties": {
"server_url": {
"type": "string",
"description": "The address of jaeger-agent's HTTP sampling server",
"format": "uri",
"examples": ["http://localhost:5778/sampling"]
},
"trace_id_ratio": {
"type": "number",
"description": "Initial sampling ratio before contacting the sampling server.",
"minimum": 0,
"maximum": 1,
"default": 1,
"examples": [0.5]
}
}
}
}
},
"zipkin": {
"type": "object",
"additionalProperties": false,
"description": "Configures the zipkin tracing backend.",
"properties": {
"server_url": {
"type": "string",
"description": "The address of the Zipkin server where spans should be sent to.",
"format": "uri",
"examples": ["http://localhost:9411/api/v2/spans"]
},
"sampling": {
"type": "object",
"propertyNames": {
"enum": ["sampling_ratio"]
},
"additionalProperties": false,
"properties": {
"sampling_ratio": {
"type": "number",
"description": "Sampling ratio for spans.",
"examples": [0.4]
}
}
}
}
},
"otlp": {
"type": "object",
"additionalProperties": false,
"description": "Configures the OTLP tracing backend.",
"properties": {
"server_url": {
"type": "string",
"description": "The endpoint of the OTLP exporter (HTTP) where spans should be sent to.",
"anyOf": [
{
"title": "IPv6 Address and Port",
"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]*)$"
},
{
"title": "IPv4 Address and Port",
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}:([0-9]*)$"
},
{
"title": "Hostname and Port",
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]):([0-9]*)$"
}
],
"examples": ["localhost:4318"]
},
"insecure": {
"type": "boolean",
"description": "Will use HTTP if set to true; defaults to HTTPS."
},
"sampling": {
"type": "object",
"propertyNames": {
"enum": ["sampling_ratio"]
},
"additionalProperties": false,
"properties": {
"sampling_ratio": {
"type": "number",
"description": "Sampling ratio for spans.",
"examples": [0.4]
}
}
}
}
}
}
}
}
},
"log": {
"title": "Log",
Expand Down

0 comments on commit ddda29c

Please sign in to comment.