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

Extend agent payload definitions #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rarguelloF
Copy link

Extend the agent_payload.json definition including missing fields.

Also added a way to include conditionals in the generated JSON schema through the optional customize_json_schema method.

@rarguelloF rarguelloF marked this pull request as ready for review January 18, 2024 14:55
@rarguelloF rarguelloF requested a review from a team as a code owner January 18, 2024 14:55
from enum import Enum


class SpanKind(str, Enum):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be defined as an Annotated Field type? Something along these lines: https://github.com/DataDog/schema/blob/main/semantic-core/generation/semantic_model/registry/properties/data_policies.py#L12-L16

This way we can leverage the Fields type to define in here all of the common properties that should apply to wherever this type is used.

from semantic_model.registry.types.trace_chunk import TraceChunk


class TracerPayload(BaseModel):
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be under /payloads, no? Is this meant to be a reusable type?

Same for trace_chunk.py.

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