Skip to content

spored's metrics/tracing/idle-cpu tags can't be set by any spawn path; the monitoring doc's --tag example is refused #1244

Closed

Description

@scttfrdmn

Found by the #689 tag contract gate (tag_contract_test.go). Verified in code, not on AWS.

pkg/provider/ec2.go reads spawn:metrics-enabled, spawn:metrics-port, spawn:metrics-bind, spawn:metrics-path, spawn:tracing-enabled, spawn:tracing-exporter, spawn:tracing-sampling, spawn:tracing-endpoint and spawn:idle-cpu (around lines 618 and 715-735). Nothing in the repo writes any of them.

docs/self-hosted-monitoring.md (around line 33) tells users to tag at launch with:

spawn launch my-worker --instance-type c7g.large --tag spawn:metrics-enabled=true

but parseKVTags (cmd/utils.go:105) refuses any --tag key starting with spawn: ("the spawn: prefix is reserved"). So the documented command fails, and the only way to reach these branches is an out-of-band aws ec2 create-tags. That has to land before spored reads its config at boot.

Options: add launch flags (or a --config key) that write these tags; allow-list these keys in parseKVTags; or fix the doc to describe the out-of-band route. Until one of those lands, the contract gate allow-lists the nine keys, pointing at this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions