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

add exporter retry configuration #97

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
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: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Unreleased

* Adding initial instrumentation configuration schema

* Adding initial instrumentation configuration schema. [#91](https://github.com/open-telemetry/opentelemetry-configuration/pull/91)
* Add exporter `retry` configuration. [#97](https://github.com/open-telemetry/opentelemetry-configuration/pull/97)

## [v0.2.0] - 2024-05-08

Expand Down
2 changes: 2 additions & 0 deletions examples/anchors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ exporters:
api-key: !!str 1234
compression: gzip
timeout: 10000
retry:
enabled: true

logger_provider:
processors:
Expand Down
16 changes: 16 additions & 0 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ logger_provider:
#
# Environment variable: OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_LOGS_INSECURE
insecure: false
# Configure retry policy
jack-berg marked this conversation as resolved.
Show resolved Hide resolved
retry:
# Configure retry enabled
enabled: true
Copy link
Member

Choose a reason for hiding this comment

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

If we buy my argument that enabled: true by default, then we should rename it to disabled to align with spec naming conventions for booleans:

All Boolean environment variables SHOULD be named and defined such that false is the expected safe default behavior.

# Configure a simple span processor.
- simple:
# Configure exporter.
Expand Down Expand Up @@ -199,6 +203,10 @@ meter_provider:
#
# Environment variable: OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_METRICS_INSECURE
insecure: false
# Configure retry policy
retry:
# Configure retry enabled
jack-berg marked this conversation as resolved.
Show resolved Hide resolved
enabled: true
# Configure temporality preference.
#
# Environment variable: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
Expand Down Expand Up @@ -323,6 +331,10 @@ tracer_provider:
#
# Environment variable: OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_TRACES_INSECURE
insecure: false
# Configure retry policy
retry:
# Configure retry enabled
enabled: true
# Configure a batch span processor.
- batch:
# Configure exporter.
Expand All @@ -339,6 +351,10 @@ tracer_provider:
#
# Environment variable: OTEL_EXPORTER_ZIPKIN_TIMEOUT
timeout: 10000
# Configure retry policy
retry:
# Configure retry enabled
enabled: true
# Configure a simple span processor.
- simple:
# Configure exporter.
Expand Down
13 changes: 13 additions & 0 deletions schema/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
},
"insecure": {
"type": "boolean"
},
"retry": {
"$ref": "#/$defs/Retry"
}
},
"required": [
Expand All @@ -74,6 +77,16 @@
"Console": {
"type": "object",
"additionalProperties": false
},
"Retry": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true
}
}
}
}
}
9 changes: 6 additions & 3 deletions schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@
"type": "integer",
"minimum": 0
},
"insecure": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved insecure up to be consistent with common.json/Otlp

"type": "boolean"
},
"retry": {
"$ref": "common.json#/$defs/Retry"
},
"temporality_preference": {
"type": "string"
},
Expand All @@ -175,9 +181,6 @@
"explicit_bucket_histogram",
"base2_exponential_bucket_histogram"
]
},
"insecure": {
"type": "boolean"
}
},
"required": [
Expand Down
3 changes: 3 additions & 0 deletions schema/tracer_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@
"timeout": {
"type": "integer",
"minimum": 0
},
"retry": {
"$ref": "common.json#/$defs/Retry"
}
},
"required": [
Expand Down
Loading