Skip to content
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

logs: introduce LogAttributes type #4342

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented Dec 9, 2024

Description

Logs attribute accepts AnyValue as AttributeValue add a type to describe that and start using it.

Fixes #4315

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@xrmx xrmx requested a review from a team as a code owner December 9, 2024 11:45
@xrmx xrmx marked this pull request as draft December 9, 2024 11:46
@xrmx xrmx added the Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary label Dec 9, 2024
@xrmx xrmx force-pushed the logs-attributes-typing branch from 66ec409 to 57a6fb3 Compare December 24, 2024 08:15
@xrmx xrmx requested a review from lmolkova December 24, 2024 08:43
@@ -56,3 +56,5 @@
],
...,
]

LogAttributes = Mapping[str, "AnyValue"]
Copy link
Contributor

@lmolkova lmolkova Dec 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the last discussions in Spec and Log SIG, calling the LogAttributes may be problematic since we may eventually support complex attributes on events and spans. So we should consider calling them something signal-agnostic (ComplexAttributes, ExtendedAttributes, etc).

I'd suggest to hold this PR back for a bit - I'll bring it up on the spec call after the holidays and let's try to pick a consistent name across different languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Logs API and SDK: logs attributes are allowed to have AnyValue values
4 participants