Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .schemagen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mappings:
time:
Duration:
schemaType: string
format: duration
allowedRefs:
- go.opentelemetry.io/collector
- github.com/jaegertracing/jaeger
- github.com/open-telemetry/opentelemetry-collector-contrib
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ nocover:
@echo Verifying that all packages have test files to count in coverage
@scripts/lint/check-test-files.sh $(ALL_PKGS)

.PHONY: generate-schemas
generate-schemas: $(SCHEMAGEN)
@echo "Generating schemas for internal extensions..."
@for dir in \
cmd/jaeger/internal/extension/expvar \
cmd/jaeger/internal/extension/jaegermcp \
cmd/jaeger/internal/extension/jaegerquery \
cmd/jaeger/internal/extension/jaegerstorage \
cmd/jaeger/internal/extension/remotesampling \
cmd/jaeger/internal/extension/remotestorage; \
do \
echo " Processing $$dir"; \
$(SCHEMAGEN) -c Config ./$$dir; \
done

.PHONY: fmt
fmt: $(GOFUMPT)
@echo Running import-order-cleanup on ALL_SRC ...
Expand Down
5 changes: 5 additions & 0 deletions cmd/jaeger/internal/extension/expvar/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$defs:
config:
type: object
allOf:
- $ref: go.opentelemetry.io/collector/config/confighttp.server_config
Copy link
Member

Choose a reason for hiding this comment

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

could you please create an ADR that outlines the overall plan? For example, how would this external ref be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! added in the latest commit.

20 changes: 20 additions & 0 deletions cmd/jaeger/internal/extension/jaegermcp/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$defs:
config:
description: Config represents the configuration for the Jaeger MCP server extension.
type: object
properties:
http:
description: HTTP contains the HTTP server configuration for the MCP protocol endpoint.
$ref: go.opentelemetry.io/collector/config/confighttp.server_config
max_search_results:
description: MaxSearchResults limits the number of trace search results.
type: integer
max_span_details_per_request:
description: MaxSpanDetailsPerRequest limits the number of spans that can be fetched in a single request.
type: integer
server_name:
description: ServerName is the name of the MCP server for protocol identification.
type: string
server_version:
description: ServerVersion is the version of the MCP server.
type: string
22 changes: 22 additions & 0 deletions cmd/jaeger/internal/extension/jaegerquery/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$defs:
config:
description: Config represents the configuration for jaeger-query,
type: object
properties:
storage:
description: Storage holds configuration related to the various data stores that are to be queried.
$ref: storage
allOf:
- $ref: ./internal.query_options
storage:
type: object
properties:
metrics:
description: Metrics contains the name of the metric storage that is being queried.
type: string
traces:
description: TracesPrimary contains the name of the primary trace storage that is being queried.
type: string
traces_archive:
description: TracesArchive contains the name of the archive trace storage that is being queried.
type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$defs:
config:
description: Config embeds the shared storage configuration.
type: object
allOf:
- $ref: github.com/jaegertracing/jaeger/cmd/internal/storageconfig.config
39 changes: 39 additions & 0 deletions cmd/jaeger/internal/extension/remotesampling/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
$defs:
adaptive_config:
type: object
properties:
sampling_store:
description: SamplingStore is the name of the storage defined in the jaegerstorage extension.
type: string
allOf:
- $ref: github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy/adaptive.options
config:
type: object
properties:
adaptive:
x-optional: true
$ref: adaptive_config
file:
x-optional: true
$ref: file_config
grpc:
x-optional: true
$ref: go.opentelemetry.io/collector/config/configgrpc.server_config
http:
x-optional: true
$ref: go.opentelemetry.io/collector/config/confighttp.server_config
file_config:
type: object
properties:
default_sampling_probability:
description: DefaultSamplingProbability is the sampling probability used by the Strategy Store for static sampling
type: number
x-customType: float64
path:
description: File specifies a local file as the source of sampling strategies.
type: string
reload_interval:
description: ReloadInterval is the time interval to check and reload sampling strategies file
type: string
x-customType: time.Duration
format: duration
10 changes: 10 additions & 0 deletions cmd/jaeger/internal/extension/remotestorage/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$defs:
config:
type: object
properties:
multi_tenancy:
$ref: github.com/jaegertracing/jaeger/internal/tenancy.options
storage:
type: string
allOf:
- $ref: go.opentelemetry.io/collector/config/configgrpc.server_config
Loading