opentelemetry-collector/component
Roger Coll b288271b77
[componentstatus] Add attributes map to Event (#13348)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds a `pcommon.Map` to the Event struct to represent additional
metadata from the producer. These attributes can be interpreted by
consumers, such as `Watcher` implementations like the healthcheckv2
extension.

Since the long-term goal is to replace Event with a pdata.Log
(OpenTelemetry Event), introducing attributes serves as an intermediary
step. This allows for experimentation with subcomponents and more
fine-grained events without immediately committing to a full migration.

It extends the `NewEvent` constructor in a backward compatible approach
with a new optional `...EventBuilderOption` parameter. The
EventBuilderOption is a sealed interface which is implemented with new
methods like `WithAttributes`.

<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes #
https://github.com/open-telemetry/opentelemetry-collector/issues/13210

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Constructor unit tests, calls to generate Events from the internal graph
have not been modified.

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->
2025-08-07 09:02:36 +00:00
..
componentstatus [componentstatus] Add attributes map to Event (#13348) 2025-08-07 09:02:36 +00:00
componenttest fix(deps): update opentelemetry-go monorepo to v1.37.0 (#13515) 2025-07-29 03:20:43 +00:00
Makefile split component into its own module (#6543) 2022-11-15 13:28:26 -08:00
build_info.go [chore] add checkapi to tools (#12954) 2025-05-05 15:52:16 +00:00
component.go [component] Make component.Kind a struct (#12214) 2025-01-31 10:46:36 +00:00
component_test.go [chore] update tests to use Empty (#12750) 2025-03-27 20:52:18 +00:00
config.go Remove a lot of deprecated symbols (#12421) 2025-02-18 16:57:10 +00:00
doc.go [chore] update the comment of the component package (#9798) 2024-03-29 18:19:03 -07:00
go.mod fix(deps): update opentelemetry-go monorepo to v1.37.0 (#13515) 2025-07-29 03:20:43 +00:00
go.sum fix(deps): update opentelemetry-go monorepo to v1.37.0 (#13515) 2025-07-29 03:20:43 +00:00
host.go [component] Remove deprecated `Host.GetFactory` method (#10771) 2024-08-01 10:36:55 +02:00
identifiable.go [chore][component] Minor stylistic updates to `component.ID` (#13543) 2025-07-31 20:43:18 +00:00
identifiable_example_test.go docs: add testable examples for component.ID and component.Type Closes Issue #13146 (#13430) 2025-07-28 16:38:30 +00:00
identifiable_test.go [chore] Move tests related to `component.Type` (#12088) 2025-01-14 21:53:03 +00:00
package_test.go [chore] Enable goleak for all (passing) tests (#9173) 2024-01-03 08:35:58 -08:00
telemetry.go Inject component-identifying scope attributes (#12617) 2025-03-28 12:15:25 +00:00