Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: moving to otel from opencensus #3011

Merged
merged 30 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1c2a920
migrating to otel
JaydipGabani Nov 8, 2023
5cd3fde
Merge branch 'master' into opent
JaydipGabani Nov 15, 2023
661e1ee
Merge branch 'master' into opent
JaydipGabani Nov 16, 2023
20195ec
Merge branch 'master' into opent
JaydipGabani Nov 18, 2023
d157c71
Merge branch 'master' into opent
JaydipGabani Nov 27, 2023
e7f8a93
removing unnecessary deltas and refactoring
JaydipGabani Nov 29, 2023
c99e535
refactoring tests
JaydipGabani Dec 4, 2023
97de9de
Merge branch 'master' into opent
JaydipGabani Dec 4, 2023
b48131f
Merge branch 'master' into opent
JaydipGabani Dec 5, 2023
60b13b5
adding read locks and refatoring tests
JaydipGabani Dec 6, 2023
dd39d95
adding test metrics client
JaydipGabani Dec 7, 2023
c71d8a0
Merge branch 'master' into opent
JaydipGabani Dec 14, 2023
8d1d6f2
Merge branch 'master' into opent
JaydipGabani Jan 2, 2024
12b8af9
adding missing mutext and addressing nits
JaydipGabani Jan 2, 2024
74a1efc
using duration flag for time interval
JaydipGabani Jan 2, 2024
776eadf
Merge branch 'master' into opent
JaydipGabani Jan 3, 2024
1991a56
adding detectors for stackdriver
JaydipGabani Jan 4, 2024
c7f31e1
Merge branch 'opent' of github.com:JaydipGabani/gatekeeper into opent
JaydipGabani Jan 4, 2024
18edba5
updating otel-endpoint flag name
JaydipGabani Jan 5, 2024
37f498d
adding resource to autodetect env in stackdriver
JaydipGabani Jan 11, 2024
a22727d
merging to master
JaydipGabani Jan 11, 2024
bc8a472
Merge branch 'JaydipGabani-opent' into opent
JaydipGabani Jan 11, 2024
22410c2
fixing nits and bug for watch metrics
JaydipGabani Jan 15, 2024
d029e54
merging master
JaydipGabani Jan 15, 2024
68aa946
Merge branch 'JaydipGabani-opent' into opent
JaydipGabani Jan 15, 2024
8919e95
Merge branch 'master' into opent
JaydipGabani Jan 16, 2024
20b8d79
fix for running multiple metrics backend
JaydipGabani Jan 16, 2024
e4a707f
fixing unit test
JaydipGabani Jan 16, 2024
37c37c0
refactoring instrument creation
JaydipGabani Jan 17, 2024
b5c3c1a
adding unit tests for common pkg
JaydipGabani Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cmd/build/helmify/static/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ information._
| enableGeneratorResourceExpansion | Enable generator resource expansion (beta feature) | `true` |
| enableTLSHealthcheck | Enable probing webhook API with certificate stored in certDir | `false` |
| maxServingThreads | Limit the number of concurrent calls the validation backend made by the validation webhook. -1 limits this value to GOMAXPROCS. Configuring this value may lower max RAM usage and limit CPU throttling, Tuning it can optimize serving capacity. | `-1` |
| metricsBackends | Metrics exporters to use. Valid exporters are: `prometheus`, `stackdriver`, and `opencensus` | `["prometheus"]` |
| metricsBackends | Metrics exporters to use. Valid exporters are: `prometheus`, `stackdriver`, and `opentelemetry` starting from Gatekeeper 3.15 | `["prometheus"]` |
Copy link
Member

@sozercan sozercan Jan 11, 2024

Choose a reason for hiding this comment

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

this is not a great experience but out of scope for this pr, opened #3213

| mutatingWebhookName | The name of the `MutatingWebhookConfiguration` | `gatekeeper-mutating-webhook-configuration` |
| mutatingWebhookFailurePolicy | The failurePolicy for the mutating webhook | `Ignore` |
| mutatingWebhookReinvocationPolicy | The reinvocationPolicy for the mutating webhook | `Never` |
Expand Down
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ spec:
# used by stackdriver
- name: CONTAINER_NAME
value: "manager"
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.pod.name=$(POD_NAME),k8s.namespace.name=$(NAMESPACE),k8s.container.name=$(CONTAINER_NAME)
resources:
limits:
memory: 512Mi
Expand Down Expand Up @@ -170,6 +172,8 @@ spec:
# used by stackdriver
- name: CONTAINER_NAME
value: "manager"
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.pod.name=$(POD_NAME),k8s.namespace.name=$(NAMESPACE),k8s.container.name=$(CONTAINER_NAME)
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down
34 changes: 18 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@ replace sigs.k8s.io/controller-runtime => ./third_party/sigs.k8s.io/controller-r

require (
cloud.google.com/go/trace v1.10.4
contrib.go.opencensus.io/exporter/ocagent v0.7.0
contrib.go.opencensus.io/exporter/prometheus v0.4.2
contrib.go.opencensus.io/exporter/stackdriver v0.13.14
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.44.0
github.com/dapr/go-sdk v1.8.0
github.com/davecgh/go-spew v1.1.1
github.com/dominikbraun/graph v0.16.2
github.com/go-logr/logr v1.2.4
github.com/go-logr/logr v1.3.0
github.com/go-logr/zapr v1.2.4
github.com/golang/protobuf v1.5.3
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.4.0
github.com/onsi/gomega v1.27.10
github.com/open-policy-agent/cert-controller v0.8.0
github.com/open-policy-agent/frameworks/constraint v0.0.0-20231030230613-2e0cb3d68575
github.com/open-policy-agent/frameworks/constraint v0.0.0-20231019180654-3eb381ce6cbe
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
go.opencensus.io v0.24.0
go.opentelemetry.io/contrib/detectors/aws/ec2 v1.21.1
go.opentelemetry.io/contrib/detectors/gcp v1.21.1
go.opentelemetry.io/otel v1.21.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0
go.opentelemetry.io/otel/exporters/prometheus v0.40.0
go.opentelemetry.io/otel/metric v1.21.0
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/sdk/metric v1.19.0
go.uber.org/automaxprocs v1.5.3
go.uber.org/zap v1.24.0
golang.org/x/net v0.17.0
Expand Down Expand Up @@ -54,16 +59,17 @@ require (
cloud.google.com/go/monitoring v1.16.1 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.44.0 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/aws/aws-sdk-go v1.43.31 // indirect
github.com/aws/aws-sdk-go v1.47.9 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/containerd/containerd v1.7.11 // indirect
Expand All @@ -82,8 +88,6 @@ require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-chi/chi/v5 v5.0.8 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
Expand All @@ -108,6 +112,7 @@ require (
github.com/klauspost/compress v1.16.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.48 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
Expand All @@ -122,8 +127,6 @@ require (
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/prometheus v0.35.0 // indirect
github.com/prometheus/statsd_exporter v0.22.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand All @@ -132,13 +135,12 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
Expand Down
Loading
Loading