Skip to content

Conversation

@CasperGN
Copy link
Contributor

@CasperGN CasperGN commented Dec 18, 2025

Description

This PR allows default configuration and default secrets to be passed to the agent through agent-secretstore and agent-runtime. This PR also covers automatically setting up OTel tracing if the appropriate configuration parameters are passed through agent-runtime statestore.
This allows operators to automate configuration setup as well as externalize the lifecycle of these configurations.

NB: This carries a breaking change with dropping support for Python 3.10.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR closes: #310

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Created/updated tests
  • Tested this change against all the quickstarts
  • Extended the documentation

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

@CasperGN
Copy link
Contributor Author

CasperGN commented Dec 18, 2025

@sicoyle before I get too far it would be good to align on the assumptions I take on naming:

Secrets:

  • OTEL_TOKEN -> Bearer token for OTLP auth

Conf:

  • OTEL_ENDPOINT -> Str: endpoint to otel collectors
  • OTEL_ENABLED -> Bool: whether to init otel
  • OTEL_TRACING_ENABLED -> Bool: Whether to init tracing
  • OTEL_LOGGING_ENABLED -> Bool: Whether to init logging
  • OTEL_TRACING_EXPORTER -> Enum: Type of exporter (otlp_grpc, otlp_http, zipkin, console, defaults to latter)
  • OTEL_LOGGING_EXPORTER -> Enum: Type of exporter (otlp_grpc, otlp_http, console, defaults to latter)

I was thinking we could also allow users to specify this via env variables on equal terms.

@sicoyle
Copy link
Collaborator

sicoyle commented Dec 18, 2025

@sicoyle before I get too far it would be good to align on the assumptions I take on naming:

Looks great so far!

Instead of an env var equivalent what are your thoughts on if we add an otelConfig dataclass instead as an optional secondary setup to reduce the amt of env vars we support.

Copy link
Collaborator

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

few comments so far for ya :)

pubsub = AgentPubSubConfig(
pubsub_name="agent-pubsub",
agent_topic=f"{name.replace(' ', '-').lower()}.topic",
broadcast_topic="agents.broadcast",
Copy link
Collaborator

Choose a reason for hiding this comment

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

what if someone has set agent-pubsub and we're picking it up, but they set a diff broadcast_topic? Same for the state components... then, we would be overriding their value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uf, this is a good point. Let me try to handle this scenario better!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, shouldn't that be covered by the conditional:

if (
    "pubsub" in component.type
    and component.name == "agent-pubsub"
    and pubsub is None
):
  ...

If they've added:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: agent-pubsub
spec:
  type: pubsub.redis
  version: v1
  metadata:
    - name: redisHost
      value: localhost:6379

But they have not added it in the agent instantiation then this does exactly what we want it to, no?
"pubsub" in component.type -> We found the component
and component.name == "agent-pubsub" -> It has the right default naming
and pubsub is None -> And they didn't pass any during instantiation

Then the agent would pick it up as the default pubsub

Co-authored-by: Sam <[email protected]>
Signed-off-by: Casper Nielsen <[email protected]>
@CasperGN
Copy link
Contributor Author

@sicoyle before I get too far it would be good to align on the assumptions I take on naming:

Looks great so far!

Instead of an env var equivalent what are your thoughts on if we add an otelConfig dataclass instead as an optional secondary setup to reduce the amt of env vars we support.

@sicoyle I think this is a better approach. We'd still have to support the "usual suspects" (i.e., endpoint & token) but it would substantially lower the amount!

@CasperGN CasperGN marked this pull request as ready for review January 7, 2026 16:08
@CasperGN CasperGN requested review from a team as code owners January 7, 2026 16:08
Copy link
Collaborator

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

few comments so far and will complete my review in my morning. Thank you!!

CasperGN and others added 5 commits January 8, 2026 00:03
Co-authored-by: Sam <[email protected]>
Signed-off-by: Casper Nielsen <[email protected]>
Co-authored-by: Sam <[email protected]>
Signed-off-by: Casper Nielsen <[email protected]>
Co-authored-by: Sam <[email protected]>
Signed-off-by: Casper Nielsen <[email protected]>
Copy link
Collaborator

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

one final comment and then g2g - thank you!

CasperGN and others added 12 commits January 8, 2026 15:45
Co-authored-by: Sam <[email protected]>
Signed-off-by: Casper Nielsen <[email protected]>
…ssed through the payload

Signed-off-by: Casper Nielsen <[email protected]>
…ld + include possible system_prompt overwrite

Signed-off-by: Casper Nielsen <[email protected]>
sicoyle
sicoyle previously approved these changes Jan 8, 2026
Copy link
Collaborator

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

LGTM, pls fix the linter issue (flake8 I believe) and then this is g2g 🚀

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.

[Observability] Enable default secret store for agent configuration

3 participants