Skip to content

Commit

Permalink
remove generated jsonschema code (#8620)
Browse files Browse the repository at this point in the history
This code will live in the opentelemetry-go-contrib repo in the future.

This depends on
open-telemetry/opentelemetry-go-contrib#4376

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
Alex Boten authored Nov 16, 2023
1 parent e13dd5b commit a82663e
Show file tree
Hide file tree
Showing 42 changed files with 323 additions and 1,225 deletions.
25 changes: 25 additions & 0 deletions .chloggen/codeboten_rm-generated-jsonschema-code.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: deprecation

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: telemetry

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: deprecate jsonschema generated types

# One or more tracking issues or pull requests related to the change
issues: [15009]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [api]
26 changes: 0 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,32 +250,6 @@ genpdata:
$(GOCMD) run pdata/internal/cmd/pdatagen/main.go
$(MAKE) fmt

# The source directory for configuration schema.
OPENTELEMETRY_JSONSCHEMA_SRC_DIR=service/internal/proctelemetry/opentelememetry-configuration

# The SHA matching the current version of the configuration schema to use
OPENTELEMETRY_JSONSCHEMA_VERSION=main

# Cleanup temporary directory
genjsonschema-cleanup:
rm -Rf ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR}

# Generate structs for configuration from configuration schema
genjsonschema: genjsonschema-cleanup $(GOJSONSCHEMA)
mkdir -p ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR}
curl -sSL https://api.github.com/repos/open-telemetry/opentelemetry-configuration/tarball/${OPENTELEMETRY_JSONSCHEMA_VERSION} | tar xz --strip 1 -C ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR}
$(GOJSONSCHEMA) \
--package telemetry \
--tags mapstructure \
--output ./service/telemetry/generated_config.go \
--schema-package=https://opentelemetry.io/otelconfig/opentelemetry_configuration.json=github.com/open-telemetry/opentelemetry-collector/schema \
${OPENTELEMETRY_JSONSCHEMA_SRC_DIR}/schema/opentelemetry_configuration.json
@echo Modify jsonschema generated files.
sed -f $(TOOLS_MOD_DIR)/jsonschema_patch.sed service/telemetry/generated_config.go > service/telemetry/generated_config_tmp.go
mv service/telemetry/generated_config_tmp.go service/telemetry/generated_config.go
$(MAKE) fmt
$(MAKE) genjsonschema-cleanup

# Generate semantic convention constants. Requires a clone of the opentelemetry-specification repo
gensemconv:
@[ "${SPECPATH}" ] || ( echo ">> env var SPECPATH is not set"; exit 1 )
Expand Down
1 change: 1 addition & 0 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ require (
go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect
go.opentelemetry.io/collector/semconv v0.89.0 // indirect
go.opentelemetry.io/collector/service v0.89.0 // indirect
go.opentelemetry.io/contrib/config v0.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.21.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcorecol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions config/configgrpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/exporter => ../../exporter

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/connector => ../../connector
Expand All @@ -112,8 +110,4 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata

replace go.opentelemetry.io/collector/component => ../../component

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/consumer => ../../consumer

replace go.opentelemetry.io/collector/service => ../../service
8 changes: 0 additions & 8 deletions config/confighttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ replace go.opentelemetry.io/collector/config/configauth => ../configauth

replace go.opentelemetry.io/collector/config/configcompression => ../configcompression

replace go.opentelemetry.io/collector/config/confignet => ../confignet

replace go.opentelemetry.io/collector/config/configopaque => ../configopaque

replace go.opentelemetry.io/collector/config/configtls => ../configtls
Expand All @@ -79,8 +77,6 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/exporter => ../../exporter

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/connector => ../../connector
Expand All @@ -91,8 +87,4 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata

replace go.opentelemetry.io/collector/component => ../../component

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/consumer => ../../consumer

replace go.opentelemetry.io/collector/service => ../../service
8 changes: 0 additions & 8 deletions connector/forwardconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/featuregate => ../../featuregate

replace go.opentelemetry.io/collector/consumer => ../../consumer
Expand All @@ -74,8 +70,4 @@ retract (
v0.69.0 // Release failed, use v0.69.1
)

replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet

replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry

replace go.opentelemetry.io/collector/service => ../../service
8 changes: 0 additions & 8 deletions connector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ replace go.opentelemetry.io/collector/consumer => ../consumer

replace go.opentelemetry.io/collector/extension => ../extension

replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension

replace go.opentelemetry.io/collector/featuregate => ../featuregate

replace go.opentelemetry.io/collector/pdata => ../pdata
Expand All @@ -64,10 +62,4 @@ replace go.opentelemetry.io/collector/processor => ../processor

replace go.opentelemetry.io/collector/receiver => ../receiver

replace go.opentelemetry.io/collector/semconv => ../semconv

replace go.opentelemetry.io/collector/exporter => ../exporter

replace go.opentelemetry.io/collector/config/confignet => ../config/confignet

replace go.opentelemetry.io/collector/service => ../service
8 changes: 0 additions & 8 deletions consumer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ replace go.opentelemetry.io/collector/exporter => ../exporter

replace go.opentelemetry.io/collector/extension => ../extension

replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension

replace go.opentelemetry.io/collector/featuregate => ../featuregate

replace go.opentelemetry.io/collector/pdata => ../pdata
Expand All @@ -47,17 +45,11 @@ replace go.opentelemetry.io/collector/processor => ../processor

replace go.opentelemetry.io/collector/receiver => ../receiver

replace go.opentelemetry.io/collector/semconv => ../semconv

retract (
v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1
v0.69.0 // Release failed, use v0.69.1
)

replace go.opentelemetry.io/collector/connector => ../connector

replace go.opentelemetry.io/collector/config/confignet => ../config/confignet

replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry

replace go.opentelemetry.io/collector/service => ../service
8 changes: 0 additions & 8 deletions exporter/debugexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,10 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/extension => ../../extension

replace go.opentelemetry.io/collector/connector => ../../connector

replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet

replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry

replace go.opentelemetry.io/collector/service => ../../service
8 changes: 0 additions & 8 deletions exporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ replace go.opentelemetry.io/collector/consumer => ../consumer

replace go.opentelemetry.io/collector/extension => ../extension

replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension

replace go.opentelemetry.io/collector/featuregate => ../featuregate

replace go.opentelemetry.io/collector/pdata => ../pdata
Expand All @@ -84,14 +82,8 @@ replace go.opentelemetry.io/collector/processor => ../processor

replace go.opentelemetry.io/collector/receiver => ../receiver

replace go.opentelemetry.io/collector/semconv => ../semconv

retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module

replace go.opentelemetry.io/collector/connector => ../connector

replace go.opentelemetry.io/collector/config/confignet => ../config/confignet

replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry

replace go.opentelemetry.io/collector/service => ../service
8 changes: 0 additions & 8 deletions exporter/loggingexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,11 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

retract (
v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1
v0.69.0 // Release failed, use v0.69.1
)

replace go.opentelemetry.io/collector/connector => ../../connector

replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet

replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry

replace go.opentelemetry.io/collector/service => ../../service
11 changes: 4 additions & 7 deletions exporter/otlpexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ require (
go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect
go.opentelemetry.io/collector/receiver v0.89.0 // indirect
go.opentelemetry.io/collector/service v0.89.0 // indirect
go.opentelemetry.io/contrib/config v0.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
go.opentelemetry.io/otel/sdk v1.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect
go.opentelemetry.io/otel/trace v1.20.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
Expand Down Expand Up @@ -104,12 +105,6 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/service => ../../service

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/consumer => ../../consumer

retract (
Expand All @@ -124,3 +119,5 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con
replace go.opentelemetry.io/collector/config/confighttp => ../../config/confighttp

replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver

replace go.opentelemetry.io/collector/semconv => ../../semconv
3 changes: 3 additions & 0 deletions exporter/otlpexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions exporter/otlphttpexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ require (
go.opentelemetry.io/collector/extension v0.89.0 // indirect
go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect
go.opentelemetry.io/collector/service v0.89.0 // indirect
go.opentelemetry.io/contrib/config v0.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
go.opentelemetry.io/otel/sdk v1.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect
go.opentelemetry.io/otel/trace v1.20.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.18.0 // indirect
Expand Down Expand Up @@ -114,10 +115,6 @@ replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/ot

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/service => ../../service

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/consumer => ../../consumer

retract (
Expand Down
3 changes: 3 additions & 0 deletions exporter/otlphttpexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions extension/ballastextension/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/extension/zpagesextension => ../zpagesextension

replace go.opentelemetry.io/collector/consumer => ../../consumer

retract (
Expand All @@ -77,8 +73,4 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/connector => ../../connector

replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet

replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry

replace go.opentelemetry.io/collector/service => ../../service
8 changes: 2 additions & 6 deletions extension/zpagesextension/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ require (
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect
go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect
go.opentelemetry.io/collector/service v0.89.0 // indirect
go.opentelemetry.io/contrib/config v0.1.0 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
Expand Down Expand Up @@ -66,10 +66,6 @@ replace go.opentelemetry.io/collector/processor => ../../processor

replace go.opentelemetry.io/collector/receiver => ../../receiver

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/service => ../../service

replace go.opentelemetry.io/collector/consumer => ../../consumer

retract (
Expand Down
Loading

0 comments on commit a82663e

Please sign in to comment.