Skip to content

Add multi-registry documentation with schema v2 format#1190

Closed
Copilot wants to merge 12 commits intomainfrom
copilot/create-docs-multi-registry-file
Closed

Add multi-registry documentation with schema v2 format#1190
Copilot wants to merge 12 commits intomainfrom
copilot/create-docs-multi-registry-file

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

  • Research multi-registry feature implementation
  • Understand registry_manifest.yaml structure and dependencies
  • Understand imports section functionality
  • Understand --include-unreferenced flag behavior
  • Review test data and examples
  • Create docs/multi-registry.md file with complete documentation
  • Verify documentation accuracy with actual code
  • Remove deprecated search command from examples
  • Add note about current dependency limitation
  • Fix example to include auction.name attribute
  • Remove misleading best practice about testing both modes
  • Remove Use Case 3 (Testing Registries) section
  • Update all schema examples to use v2 format (version: "2", attributes with key:, etc.)
  • Change "group" terminology to "signal" where appropriate
  • Remove schema_base_url alias mention
  • Update repository_url examples to be more realistic
  • Clarify wildcard imports apply to corresponding signal type
  • Improve imports example to show metric imports clearly
  • Remove confusing span example from imports section
  • Add explanation of how imported metrics make attributes available
  • Fix resolved_schema_url to include full path
  • Significantly reduce --include-unreferenced coverage (from ~50% to ~10%)
  • Consolidate repetitive examples into concise use case summaries
  • Simplify Command Reference section
  • Remove duplicate best practices
  • Restore "When to Use Each Mode" section for --include-unreferenced
  • Restore YAML examples in Common Use Cases section
  • Add [--include-unreferenced] back to generate command
  • Update three-level example to use realistic Company A shared registry scenario
  • All requested changes complete

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 7, 2026 16:53
Co-authored-by: jsuereth <29006+jsuereth@users.noreply.github.com>
… note

Co-authored-by: jsuereth <29006+jsuereth@users.noreply.github.com>
Co-authored-by: jsuereth <29006+jsuereth@users.noreply.github.com>
Copilot AI changed the title [WIP] Add multi-registry documentation for weaver capabilities Add multi-registry documentation Feb 7, 2026
Copilot AI requested a review from jsuereth February 7, 2026 16:59
Comment thread docs/multi-registry.md Outdated
Comment thread docs/multi-registry.md Outdated
Co-authored-by: jsuereth <29006+jsuereth@users.noreply.github.com>
Co-authored-by: jsuereth <29006+jsuereth@users.noreply.github.com>
@jsuereth jsuereth marked this pull request as ready for review February 7, 2026 18:05
@jsuereth jsuereth requested a review from a team as a code owner February 7, 2026 18:05
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.9%. Comparing base (8c1dfdb) to head (7977ec8).
⚠️ Report is 60 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1190   +/-   ##
=====================================
  Coverage   79.9%   79.9%           
=====================================
  Files        109     109           
  Lines       8586    8586           
=====================================
+ Hits        6865    6868    +3     
+ Misses      1721    1718    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kamphaus
Copy link
Copy Markdown

kamphaus commented Feb 9, 2026

Very nice.
I assume doc and code generation will be expanded on in the future.

Copy link
Copy Markdown
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

@copilot I made a bunch of comments, they are all for you. Please rewrite docs and make syntax match v2, not v1

Comment thread docs/multi-registry.md
Comment thread docs/multi-registry.md Outdated

- **name**: Unique identifier for your registry
- **version**: Semantic version of your registry (also called `semconv_version`)
- **repository_url**: Base URL where schema files are hosted (also called `schema_base_url`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- **repository_url**: Base URL where schema files are hosted (also called `schema_base_url`)
- **repository_url**: Base URL where schema files are hosted

not sure if schema_base_url is useful for external readers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the schema_base_url alias mention. Commit: 19016c3

Comment thread docs/multi-registry.md Outdated
name: otel
description: OpenTelemetry base definitions
version: 1.0.0
repository_url: https://opentelemetry.io/schemas/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
repository_url: https://opentelemetry.io/schemas/
repository_url: https://github.com/open-telemetry/semantic-conventions
resolved_schema_url: https://opentelemetry.io/schemas/1.42.0

(more realistic)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to use more realistic URLs with resolved_schema_url. Commit: 19016c3

Comment thread docs/multi-registry.md Outdated
repository_url: https://acme.com/schemas/
dependencies:
- name: otel
registry_path: ../otel_registry
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would it be a realistic/recommended use case?

Suggested change
registry_path: ../otel_registry
registry_path: https://opentelemetry.io/schemas/1.42.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to use the resolved schema URL format. Commit: 19016c3

Comment thread docs/multi-registry.md Outdated
Add an `imports` section at the top level of your YAML schema file (alongside `groups`):

```yaml
groups:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot it's not valid schema v2, update it to use schema v2

attributes:
- key: ...

don't forget version: "2"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated all schema examples to use v2 format with version: "2" and attributes with key: instead of id:. Commit: 19016c3

Comment thread docs/multi-registry.md Outdated

### How Imports Work

When you import a group:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
When you import a group:
When you import a signal definition:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to say "signal definition" instead of "group". Commit: 19016c3

Comment thread docs/multi-registry.md Outdated

When you import a group:

1. The group definition from the dependency is included in your resolved schema
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot "group" is so v1, use attribute or signal definition depending on the context

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated terminology throughout - changed "group" to "signal" or "attribute" depending on context. Commit: 19016c3

Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
Copilot AI changed the title Add multi-registry documentation Add multi-registry documentation with schema v2 format Feb 9, 2026
Copilot AI requested a review from lmolkova February 9, 2026 22:01
Comment thread docs/multi-registry.md Outdated
2. Any attributes referenced by that group are also included
3. The imported groups can be referenced using `ref` in your custom definitions
1. The signal definition from the dependency is included in your resolved schema
2. Any attributes referenced by that signal are also included
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
2. Any attributes referenced by that signal are also included
2. Any attributes referenced by that definition are also included

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to use "definition" for consistency. Commit: 90e6523

Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
Copilot AI requested a review from lmolkova February 9, 2026 22:04
Comment thread docs/multi-registry.md Outdated
type: string
brief: Name of the application.

spans:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot, where did this span come from? it's not quite useful here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the span example from the application registry. The example now focuses on showing how importing a metric (example.counter) makes its referenced attributes (error.type) available. Commit: 90e6523

Comment thread docs/multi-registry.md
2. Any attributes referenced by that signal are also included
3. The imported signals can be referenced using `ref` in your custom definitions

### Example: Referencing Imported Definitions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot I don't see an example of referencing imported metric or span, only attribute, but that's trivial

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the example to clearly show metric imports. Added explanation showing how the imported example.counter metric is available in the custom registry and how attributes become accessible through the imported metric. Commit: 90e6523

…e availability

Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
Copilot AI requested a review from lmolkova February 9, 2026 22:10
Comment thread docs/multi-registry.md Outdated
description: OpenTelemetry base definitions
version: 1.0.0
repository_url: https://github.com/open-telemetry/semantic-conventions
resolved_schema_url: https://opentelemetry.io/schemas/1.42.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot I was wrong, it should be

Suggested change
resolved_schema_url: https://opentelemetry.io/schemas/1.42.0
resolved_schema_url: https://opentelemetry.io/schemas/1.42.0/resolved_schema.yaml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to include the full path: resolved_schema_url: https://opentelemetry.io/schemas/1.42.0/resolved_schema.yaml. Commit: 0cc50af

Comment thread docs/multi-registry.md
- ref: auction.id
- ref: auction.name
- ref: error.type # References attribute from dependency

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TODO: explain to copilot how to refine imported metric

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The example shows that imported metrics are available in the resolved schema. Refining/extending imported metrics would typically be done by creating new metric definitions in your custom registry that reference the same attributes, rather than modifying the imported metric itself. The current example demonstrates the core import capability.

Comment thread docs/multi-registry.md Outdated
**With `--include-unreferenced`:**
- ✅ All signals and attributes included, even `unused` and `session.end`

## Real-World Example: OpenTelemetry Semantic Conventions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what does this example add on top of previous ones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the repetitive "Real-World Example" section. The registry manifest dependency and attribute referencing are already demonstrated in earlier sections. Commit: 0cc50af

Comment thread docs/multi-registry.md

## Common Use Cases

### Use Case 1: Vendor Extensions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot these examples seem to repeat what'd already explained in the doc, maybe just list a few bullet points in the beginning of the doc, no need to repeat yaml again?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Consolidated the "Common Use Cases" section into brief bullet points without repeating YAML examples. Removed the redundant code examples. Commit: 0cc50af

Comment thread docs/multi-registry.md Outdated
weaver registry generate [--include-unreferenced] <registry-path> <template>

# Validate a registry
weaver registry check [--include-unreferenced] <registry-path>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does it even make sense with --include-unreferenced?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Simplified the Command Reference section. Removed the detailed --include-unreferenced examples for each command and just noted that most commands support the flag. Commit: 0cc50af

Comment thread docs/multi-registry.md Outdated
weaver registry check [--include-unreferenced] <registry-path>

# Update resolved schema
weaver registry update-markdown [--include-unreferenced] <registry-path>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does it actually make sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Simplified the Command Reference section. Removed the detailed --include-unreferenced examples for each command and just noted that most commands support the flag. Commit: 0cc50af

Comment thread docs/multi-registry.md Outdated
weaver registry stats [--include-unreferenced] <registry-path>

# Generate diff between registry versions
weaver registry diff [--include-unreferenced] <baseline-path> <head-path>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does it make sense with --include-unreferenced?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Simplified the Command Reference section. Removed the detailed --include-unreferenced examples for each command and just noted that most commands support the flag. Commit: 0cc50af

Comment thread docs/multi-registry.md
- Check that archive paths (in `[brackets]`) point to the correct directory inside the archive
- Ensure the URL points to a registry with a valid `registry_manifest.yaml`

## Command Reference
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is --include-unreferenced important enough that we spend 50% of this doc on it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Significantly reduced --include-unreferenced coverage from ~50% to ~10% of the document. Removed the verbose examples and consolidated into a brief explanation with a simple before/after comparison. Reduced total document from 491 to 316 lines (35% reduction). Commit: 0cc50af

…consolidate examples

Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
Copilot AI requested a review from lmolkova February 9, 2026 22:32
Comment thread docs/multi-registry.md Outdated
Comment on lines -218 to -234
In this mode:
- ✅ All definitions from dependencies are included, regardless of references
- ✅ This includes attributes, metrics, events, and entities
- ⚠️ Results in a larger resolved schema

### When to Use Each Mode

**Use default mode (without flag)** when:
- You want a minimal schema with only used definitions
- You're generating code and want to avoid unused definitions
- You want to reduce the size of your resolved schema

**Use `--include-unreferenced`** when:
- You need complete visibility into all available definitions
- You're exploring or documenting what's available in dependencies
- You're building tooling that needs to know about all possible definitions
- You want to generate comprehensive documentation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this was useful, bring it back

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restored the "When to Use Each Mode" section explaining when to use default mode vs --include-unreferenced. Commit: d12a4d8

Comment thread docs/multi-registry.md
```
**Testing**: Create isolated test registries for validating instrumentation

## Best Practices
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

return examples back in this section

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restored the YAML examples in Common Use Cases section, showing vendor extensions and application-specific metrics with full code samples. Commit: d12a4d8

Comment thread docs/multi-registry.md Outdated

# Generate code from a registry
weaver registry generate [--include-unreferenced] <registry-path> <template>
weaver registry generate <registry-path> <template>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
weaver registry generate <registry-path> <template>
weaver registry generate [--include-unreferenced] <registry-path> <template>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added [--include-unreferenced] to the generate command. Commit: d12a4d8

Comment thread docs/multi-registry.md Outdated
Comment on lines +68 to +77
**Vendor Registry** (`acme_registry/registry_manifest.yaml`):
```yaml
name: acme
description: Acme vendor-specific definitions
version: 0.1.0
repository_url: https://acme.com/schemas/
dependencies:
- name: otel
registry_path: https://opentelemetry.io/schemas/1.42.0
```
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.

@copilot In the current model (where we only support flat hierarchies), it would be better/more realistic to use an example like: OTel <- Company A shared registry <- Application registry (Company A).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the three-level hierarchy example to use a more realistic scenario: OTel <- Company A shared registry <- Application registry (Company A). Changed vendor "acme" references to "company-a-shared" to better reflect real-world usage patterns. Commit: d12a4d8

Co-authored-by: lquerel <657994+lquerel@users.noreply.github.com>
Copilot AI requested a review from lquerel February 11, 2026 07:09
Copy link
Copy Markdown
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

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

LGTM. Just made a suggestion that copilot already took into account.

@lmolkova lmolkova moved this to To consider for the next release in OTel Weaver Project Feb 18, 2026
@jsuereth
Copy link
Copy Markdown
Contributor

closing this and will re-prompt for new docs now that we've added a bunch more fixes in core.

@jsuereth jsuereth closed this Mar 11, 2026
@github-project-automation github-project-automation Bot moved this from To consider for the next release to Done in OTel Weaver Project Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants