Skip to content

Don't call set attribute twice for the same key and make start attributes unsettable#150

Draft
lmolkova wants to merge 2 commits into
open-telemetry:mainfrom
lmolkova:dont-duplicate-attributes
Draft

Don't call set attribute twice for the same key and make start attributes unsettable#150
lmolkova wants to merge 2 commits into
open-telemetry:mainfrom
lmolkova:dont-duplicate-attributes

Conversation

@lmolkova

Copy link
Copy Markdown
Member

No description provided.

)
invocation.stop()

assert invocation.request_model == "text-embedding-3-small"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

attributes validated below


def _get_base_attributes(self) -> dict[str, Any]:
@property
def agent_name(self) -> str | None:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this one is used by langchain, convert to read-only property

@lmolkova lmolkova changed the title Don't call set attribute twice for the same key and make start attributed unsettable Don't call set attribute twice for the same key and make start attributes unsettable Jun 18, 2026
self.request_model = request_model
self.server_address = server_address
self.server_port = server_port
self._provider: str = provider

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so _ means don't directly set this, instead pass it in on initialization.. Is that enforced somehow or is it just a convention ? Does it cause a lint error at least ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants