-
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
Flow: naming convention for components #2059
Comments
For |
We'd put those in a |
My opinion is written more clearly in #2037, but I don't think we should have a generic "metrics" namespace exactly because not all metrics are the same. I think when I say |
I like this approach and separation. I think it will make it easier for people looking how to construct an end-to-end Prometheus pipeline to know where to look. One question is that the current components under the |
I am a bit torn on this, working off conceptual datatypes, helps with the findability of components. If someone is coming to use the agent without much knowledge of telemetry otel,prometheus,graphite, loki and tempo are all foreign concepts. Metrics, traces, and logs are clearer and also provide some guidance on how to connect them. The user can intuit that a That being said if you know what you are looking for then this |
Yeah, it's the Prometheus SD model, which many things reuse. Not all OpenTelemetry components would be able to consume the targets, but the Prometheus SD processor would. |
I understand the temptation for trying to make generic signal namespaces, but it's a technical challenge I don't think we're ready to handle.
What I'm implying here and in #2037 is that a My biggest concern with making all metrics-related components compatible with each other is defining an abstraction which supports all of the functionality needed for anything consuming that abstraction. It will take a significant amount of work to define a metric type which OTLP, Graphite, Prometheus, and any future metrics component can all use without any information loss. Allowing different data formats to define different namespaces means that the fully native path remains 100% compliant with upstream and aren't subject to any data loss. The user would then have to explicitly opt-in to conversion, which allows them to make a conscious decision and be aware of the side effects that may happen when crossing data format barriers. |
This sounds reasonable. We can make it implicit when the conversion happens. |
All components have been renamed to follow this convention. Closing as done. |
Background
If you include #1872 and #1843, this is our current list of Flow components:
discovery.k8s
integrations.node_exporter
local.file
metrics.mutate
metrics.remote_write
metrics.scrape
otel.exporter_jaeger
otel.exporter_otlp
otel.exporter_zipkin
otel.receiver_jaeger
otel.receiver_otlp
otel.receiver_zipkin
remote.s3
targets.mutate
To speed up development time, these components were initially named without much consideration to how they interact with other components.
We will have many more components as time goes on, and so we have a growing need for a naming convention to align related components.
Namespaces
Every component is in a "namespace" where related components are placed. For example, the
remote.s3
component above is in theremote
namespace.Namespaces may be nested when appropriate. For example, an
a.b.c
component is in thea.b
namespace (e.g., theb
namespace inside thea
namespace). Nesting a namespace is appropriate when components in a namespace can be divided into multiple responsibilities.Proposal
Namespaces should:
Components should:
I am proposing our list of components becomes:
discovery.k8s
discovery.relabel
local.file
otelcol.exporter.jaeger
otelcol.exporter.otlp
otelcol.exporter.zipkin
otelcol.receiver.jaeger
otelcol.receiver.otlp
otelcol.receiver.zipkin
prometheus.integration.node_exporter
prometheus.relabel
prometheus.scrape
prometheus.remote_write
remote.s3
discovery
namespaceThe
discovery
namespace holds components which expose targets. Its name is unchanged from the existing namespace.The existing
targets.mutate
component is renamed todiscovery.relabel
, since it also has the purpose of exposing targets to other components in the pipeline.local
namespaceThe
local
namespace holds components which expose data from the local machine. Its name is unchanged from the existing namespace.otelcol
namespaceThe
otelcol
namespace holds components which expose OpenTelemetry Collector components as Flow components. It was renamed from theotel
namespace to make the intent clearer; "otel" is a generic term for all of OpenTelemetry, and should be avoided.To avoid polluting the
otelcol
namespace, it is broken up into two nested namespaces:otelcol.receiver
for OpenTelemetry Collector receivers, andotelcol.exporter
for OpenTelemetry Collector exporters. Theotelcol.processor
namespace will be introduced when processor components are added.prometheus
namespaceThe
prometheus
namespace holds components which expose a pipeline of Prometheus metrics, from scraping to remote_write. It is renamed from themetrics
namespace.The specific name
prometheus
is chosen to make it more obvious to users what type of data is being acted on. This is related to #2037, which discusses using Prometheus directly instead of a generic abstraction for metrics.It is composed of a nested namespace,
prometheus.integration
, described below.prometheus.integration
namespaceThe
prometheus.integration
namespace holds Prometheus exporters. It is renamed from theintegrations
namespace.Naming it
prometheus.exporter
was considered, but that risks confusing users since Prometheus exporters and OpenTelemetry Collector exporters serve two different functions: Prometheus exporters expose data, OpenTelemetry Collector exporters write data.Most integrations in the static mode Grafana Agent would belong to this namespace. Some static mode integrations, like
app_o11y_receiver
andeventhandler
would not belong in this namespace and would instead need to be placed elsewhere.remote
namespaceThe
remote
namespace holds components which expose data from remote APIs or machines. Its name is unchanged from the existing namespace.The text was updated successfully, but these errors were encountered: