-
Notifications
You must be signed in to change notification settings - Fork 487
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
component/otelcol/exporter: create exporter component abstraction #2227
Conversation
This commit introduces a new package, component/otelcol/exporter, which exposes a generic Flow component implementation which can run OpenTelemetry Collector exporters. There is some stuff left to do for this implementation to be complete: * A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components. * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. All of the above will be done in separate PRs. As of this commit, there are no registered `otelcol.exporter.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213.
// We may want to put off tracing until we have native tracing | ||
// instrumentation from Flow, but metrics should come sooner since we're | ||
// already set up for supporting component-specific metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example of what we can do here once we get around to implementing this:
https://github.com/open-telemetry/opentelemetry-go/blob/example/prometheus/v0.32.1/example/prometheus/main.go#L35
It's going to require updating the OpenTeletry Collector dependency, but we're overdue for that anyway.
// Each OpenTelemetry Collector component has one instance per support | ||
// telemetry signal, which is why Scheduler supports multiple components. For | ||
// example, when creating the otlpreceiver component, you would have three | ||
// total instances: one for logs, one for metrics, and one for traces. | ||
// Scheduler should only be used to manage the different signals of the same | ||
// OpenTelemetry Collector component; this means that otlpreceiver and | ||
// jaegerreceiver should not share the same Scheduler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpaschalis how's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, reads much cleaner, thanks for the explanation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
otelconsumer.Traces | ||
otelconsumer.Metrics | ||
otelconsumer.Logs | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the way that the OTel collector works here is that an implementation can choose to handle a signal with a consumer, or return ErrDataTypeIsNotSupported
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, though ErrDataTypeIsNotSupport isn't really intended to be used by consumers; we're just reusing it here for convenience. OpenTelemetry would give you a warning at load time if you're trying to send traces to a component that doesn't support it, but since we're combining everything into one consumer we have emit the errors at runtime instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This commit introduces a new package, component/otelcol/receiver, which exposes a generic Flow component implementation which can run OpenTelemetry Collector receiver. Like grafana#2227, it leaves some work unfinished for future PRs: * A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components. * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.receiver.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213.
) This commit introduces a new package, component/otelcol/receiver, which exposes a generic Flow component implementation which can run OpenTelemetry Collector receiver. Like #2227, it leaves some work unfinished for future PRs: * A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components. * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.receiver.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to #2213.
This commit introduces a new package, component/otelcol/processor, which exposes a generic Flow component implementation which can run OpenTelemetry Collector processor. Like grafana#2227 and grafana#2254, it leaves some work unfinished for future PRs: * A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components. * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.processor.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213.
This commit introduces a new package, component/otelcol/processor, which exposes a generic Flow component implementation which can run OpenTelemetry Collector processor. Like grafana#2227 and grafana#2254, it leaves some work unfinished for future PRs: * A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components. * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.processor.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213.
This commit introduces a new package, component/otelcol/processor, which exposes a generic Flow component implementation which can run OpenTelemetry Collector processor. Like grafana#2227 and grafana#2254, it leaves some work unfinished for future PRs: * A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components. * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.processor.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213.
…2284) This commit introduces a new package, component/otelcol/processor, which exposes a generic Flow component implementation which can run OpenTelemetry Collector processor. Like #2227 and #2254, it leaves some work unfinished for future PRs: * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.processor.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to #2213.
OpenTelemetry supports many extensions. Extensions are used as a generic way to put "everything else" into OpenTelemetry. There are two types of extensions relevant to us: * [Authentication extensions][auth-ext]: used for both client and server authentication. * [Storage extensions][storage-ext]: used for external storage of state. Other extensions, such as [awsproxy][] are useful but better suited as generic Flow components rather than being shoved in the otelcol namespace, since they are unrelated to telemetry pipelines and aren't referenced by other otelcol components in the upstream configuration. This commit introduces a new package, component/otelcol/auth, which exposes a generic Flow component implementation which can run OpenTelemetry Collector extensions meant for authentication. While storage extensions may end up being Flow components eventually, it's currently marked as experimental upstream. We will reevaluate storage extension components once things have stabilized a little more. Like grafana#2227, grafana#2254, and grafana#2284, it leaves some work unfinished for future PRs: * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.auth.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213. [auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth [storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector/extension/experimental/storage [awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
OpenTelemetry supports many extensions. Extensions are used as a generic way to put "everything else" into OpenTelemetry. To quote their [documentation][ext-docs]: > Extension is the interface for objects hosted by the OpenTelemetry > Collector that don't participate directly on data pipelines but provide > some functionality to the service, examples: health check endpoint, > z-pages, etc. There are two types of extensions relevant to us: * [Authentication extensions][auth-ext]: used for both client and server authentication. * [Storage extensions][storage-ext]: used for external storage of state. Other extensions, such as [awsproxy][] are useful but better suited as generic Flow components rather than being shoved in the otelcol namespace, since they are unrelated to telemetry pipelines and aren't referenced by other otelcol components in the upstream configuration. This commit introduces a new package, component/otelcol/auth, which exposes a generic Flow component implementation which can run OpenTelemetry Collector extensions meant for authentication. While storage extensions may end up being Flow components eventually, it's currently marked as experimental upstream. We will reevaluate storage extension components once things have stabilized a little more. Like grafana#2227, grafana#2254, and grafana#2284, it leaves some work unfinished for future PRs: * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.auth.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213. [ext-docs]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/component#Extension [auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth [storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector/extension/experimental/storage [awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
OpenTelemetry supports many extensions. Extensions are used as a generic way to put "everything else" into OpenTelemetry. To quote their [documentation][ext-docs]: > Extension is the interface for objects hosted by the OpenTelemetry > Collector that don't participate directly on data pipelines but provide > some functionality to the service, examples: health check endpoint, > z-pages, etc. There are two types of extensions relevant to us: * [Authentication extensions][auth-ext]: used for both client and server authentication. * [Storage extensions][storage-ext]: used for external storage of state. Other extensions, such as [awsproxy][] are useful but better suited as generic Flow components rather than being shoved in the otelcol namespace, since they are unrelated to telemetry pipelines and aren't referenced by other otelcol components in the upstream configuration. This commit introduces a new package, component/otelcol/auth, which exposes a generic Flow component implementation which can run OpenTelemetry Collector extensions meant for authentication. While storage extensions may end up being Flow components eventually, it's currently marked as experimental upstream. We will reevaluate storage extension components once things have stabilized a little more. Like grafana#2227, grafana#2254, and grafana#2284, it leaves some work unfinished for future PRs: * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.auth.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to grafana#2213. [ext-docs]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/component#Extension [auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth [storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector/extension/experimental/storage [awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
…2352) OpenTelemetry supports many extensions. Extensions are used as a generic way to put "everything else" into OpenTelemetry. To quote their [documentation][ext-docs]: > Extension is the interface for objects hosted by the OpenTelemetry > Collector that don't participate directly on data pipelines but provide > some functionality to the service, examples: health check endpoint, > z-pages, etc. There are two types of extensions relevant to us: * [Authentication extensions][auth-ext]: used for both client and server authentication. * [Storage extensions][storage-ext]: used for external storage of state. Other extensions, such as [awsproxy][] are useful but better suited as generic Flow components rather than being shoved in the otelcol namespace, since they are unrelated to telemetry pipelines and aren't referenced by other otelcol components in the upstream configuration. This commit introduces a new package, component/otelcol/auth, which exposes a generic Flow component implementation which can run OpenTelemetry Collector extensions meant for authentication. While storage extensions may end up being Flow components eventually, it's currently marked as experimental upstream. We will reevaluate storage extension components once things have stabilized a little more. Like #2227, #2254, and #2284, it leaves some work unfinished for future PRs: * Component-specific metrics are currently ignored. * Component-specific traces are currently ignored. As of this commit, there are no registered `otelcol.auth.*` components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs. Related to #2213. [ext-docs]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/component#Extension [auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth [storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/extension/experimental/storage [awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
This commit introduces a new package,
component/otelcol/exporter
, which exposes a generic Flow component implementation which can run OpenTelemetry Collector exporters.There is some stuff left to do for this implementation to be complete:
All of the above will be done in separate PRs.
As of this commit, there are no registered
otelcol.exporter.*
components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs.Related to #2213, and based off of the original prototyping done in #1843.