Skip to content

Conversation

@thompson-tomo
Copy link
Contributor

Progresses #802 and unblocks #849

This provides as a proposal to introducing namespace definitions alongside metrics, attributes etc,

Namespaces are a way in which definitions can be grouped together as well as a method to define & eventually generate additional useful data about that namespace. Such as examples would be revision history & migration guides.

Comment on lines +35 to +39
#### Fallback linking

If neither of the 2 previous methods are satisifed,
a namespace is created by weaver which corresponds to the first path segment.
This namespace will use the default values for a namespace.
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of defining namespaces explicitly. Within Weaver right now there is no concept of namespace whatsoever by design. Hence your proposal.

(I took a wrong turn when developing live-check, I had namespace checking with the . separator built into rust code. This was removed and rewritten in rego policies.)

So,

  1. What if I don't want namespaces at all?
  2. What if I want namespaces but a different separator? Or, just CamelCase (I've seen examples of this in the wild)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So my thought would be that there should be a default namespace "default" which items are assigned to if the namespace can not be determined via either of the methods. I think that would handle the scenario of not wanting to use namespaces.

In an effort to keep it simple I would stick with the dot convention being the namespace seperator however if an author is using another convention they should use the explicit option. We could always extend later.

Comment on lines +18 to +22
#### Explicit linking

This is where the author explicitly states the namespace which this telemetry signal should be associated with.
This is to help with the when the namespace of an attribute changes.
For instance `az` has become `azure`.
Copy link
Contributor

Choose a reason for hiding this comment

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

We used to have prefix - I wonder what the reasoning was behind its removal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding was prefix was added to the attribute keys etc whereas this explicit namespace can be thought of as aliasing.

Comment on lines +37 to +39
If neither of the 2 previous methods are satisifed,
a namespace is created by weaver which corresponds to the first path segment.
This namespace will use the default values for a namespace.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we have a configuration option to use the folder as fall back source?

Comment on lines +18 to +22
#### Explicit linking

This is where the author explicitly states the namespace which this telemetry signal should be associated with.
This is to help with the when the namespace of an attribute changes.
For instance `az` has become `azure`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding was prefix was added to the attribute keys etc whereas this explicit namespace can be thought of as aliasing.

@thompson-tomo thompson-tomo changed the title Define namespaces in yaml Proposal: Define namespaces in yaml Aug 7, 2025
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