opentelemetry-collector/internal
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
..
buildscripts [chore] move api-diff pipeline to ubuntu runner (#12549) 2025-03-24 09:52:44 +00:00
cmd/pdatagen [chore] Move marshal/unmarshal JSON to work with origin (#13581) 2025-08-06 23:24:03 +00:00
e2e [componentstatus] Add attributes map to Event (#13348) 2025-08-07 09:02:36 +00:00
fanoutconsumer [chore] Prepare release v1.37.0/v0.131.0 (#13510) 2025-07-28 23:54:40 +00:00
memorylimiter Update module github.com/shirou/gopsutil/v4 to v4.25.7 (#13567) 2025-08-05 19:01:55 +00:00
sharedcomponent fix(deps): update opentelemetry-go monorepo to v1.37.0 (#13515) 2025-07-29 03:20:43 +00:00
statusutil Fix OTLP http receiver to correctly set Retry-After (#12367) 2025-02-14 02:41:37 +00:00
telemetry fix(deps): update opentelemetry-go monorepo to v1.37.0 (#13515) 2025-07-29 03:20:43 +00:00
testutil [chore]: fix testifylint rules (#12791) 2025-04-02 23:10:07 +00:00
tools Update module github.com/golangci/golangci-lint/v2 to v2.3.1 (#13566) 2025-08-05 19:02:13 +00:00