Commit Graph

14 Commits

Author SHA1 Message Date
Alex Boten 5753a58f71
update all metrics to include otelcol_ prefix (#9759)
This ensures the consistency for folks emitting metrics w/ OTLP until
the OTEP to specify pipeline telemetry is completed.

Waiting on
https://github.com/open-telemetry/opentelemetry-collector/pull/9775
before moving this forward

Fixes #9315

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-07-16 16:18:37 -07:00
Dmitrii Anoshin 4d57f5e0b8
[mdatagen] Remove WithAttributes from the telemetry builder constructor (#10608)
Attribute sets for async instruments now can be set as options to
callback setters and async instruments initializers. This allows each
async instrument to have its own attribute set.

Unblocks
https://github.com/open-telemetry/opentelemetry-collector/pull/10593
2024-07-16 10:36:35 -07:00
Dmitrii Anoshin d545fb6a10
[exporterhelper] Fix incorrect deduplication of exporter queue metrics (#10550)
Fix incorrect deduplication of otelcol_exporter_queue_size and
otelcol_exporter_queue_capacity metrics if multiple exporters are used.

Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/10444

The registered callbacks are ignored for now, which is the same behavior
as before. Ideally, we would need to unregister them properly.
2024-07-08 08:23:16 -07:00
Alex Boten 7b0c38e609
[mdatagen] make meter a struct member of telemetryBuilder (#10314)
This will be used in a follow up PR that allows initialization of
optional internal metrics which address the queue metric use-case.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-06-04 14:54:41 -07:00
Alex Boten 567a175ed9
[batchprocessor] ensure attributes are set on metadata metric (#10245)
Fixing this bug required a change in mdatagen to ensure attributes could
be passed in to the telemetry builder.
    
Fixes #9674

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-29 09:10:01 -07:00
Alex Boten 1d8c53ff0f
[batchprocessor] use mdatagen for async metric (#10233)
Follows
https://github.com/open-telemetry/opentelemetry-collector/pull/10232,
use mdatagen for async counter

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-28 11:15:55 -07:00
Alex Boten 52a9520fdb
mdatagen: support setting telemetry level in telemetry builder (#10234)
This allows components to set the minimum level needed for them to
produce telemetry. By default, this is set to
`configtelemetryLevelBasic`. If the telemetry level is below that
minimum level, then the noop meter is used for metrics.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-28 08:59:50 -07:00
Alex Boten 28242fab81
[mdatagen] add support for async instruments (#10159)
This PR adds the ability to configure asynchronous (observable)
instruments via mdatagen. This requires providing a mechanism to set
options to pass in the callbacks that will be called at the time of the
observation.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-16 13:15:27 -07:00
Alex Boten d73235fc91
[mdatagen] use mdatagen to produce component internal telemetry (#10054)
#### Description

This updates mdatagen to generate internal telemetry for components
based on metadata.yaml configuration.

#### Testing

Added tests to mdatagen and updated the batch processor to use this as
well for synchronous counters and histogram

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-06 14:01:35 -07:00
Alex Boten ce09d9773a
[mdatagen] move telemetry into its own file (#10037)
This is in preparation for using mdatagen for component telemetry.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-04-29 12:11:55 -07:00
Dmitrii Anoshin 78692b78c3
[chore] [cmd/mdatagen] Update status.go template (#9713)
To produce the same output as mdatagen in contrib. It makes it easy to
compare the diff for the mdatagen migration.
2024-03-05 13:35:54 -08:00
Alex Boten aa764826e1
[mdatagen] produce scope name with full url (#9556)
This is part of #9494

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-02-14 07:49:56 -08:00
Pablo Baeyens 26c157e3bf
[component] Add MustNewType constructor for component.Type (#9414)
**Description:** 

- Adds `component.MustNewType` to create a type. This function panics if
the type has invalid characters. Add similar functions
`component.MustNewID` and `component.MustNewIDWithName`.
- Adds `component.Type.String` to recover the string
- Use `component.MustNewType`, `component.MustNewID`,
`component.MustNewIDWithName` and `component.Type.String` everywhere in
this codebase. To do this I changed `component.Type` into an opaque
struct and checked for compile-time errors.

Some notes:

1. All components currently on core and contrib follow this rule. This
is still breaking for other components.
2. A future PR will change this into a struct, to actually validate this
(right now you can just do `component.Type("anything")` to bypass
validation). I want to do this in two steps to avoid breaking contrib
tests: we first introduce this function, and after that we change into a
struct.

**Link to tracking Issue:** Updates #9208
2024-02-02 17:33:03 +01:00
Alex Boten 36bdd22601
[chore] use mdatagen for batch processor (#9183)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-12-22 11:12:32 -08:00