Commit Graph

16 Commits

Author SHA1 Message Date
Dave Protasowski a624c759be
create a knative semconv package to simplify otel dep bumps (#3269) 2025-10-07 18:47:13 +00:00
Dave Protasowski 72b164e68f
Bump OTel dependencies and semconv (#3245)
* bump OTel deps

* bump OTel semconv to v1.37.0

* Use OTel TranslationStrategy options for prometheus

* bump OTel runtime package
2025-10-07 13:29:12 +00:00
Dave Protasowski c745f1fcaa
Fix prometheus exporter names (#3236)
There was a typo in a comment https://github.com/knative/pkg/issues/3224

This change will update the OTel prom exporter metric names to match
what will become the default in the future. If N is the current
SDK version the N+2 is when the new default will apply.

In N+1 a new TranslationStrategy option will be introduced and we
will want to set the strategy to 'UnderscoreEscapingWithSuffixes'.

Then in N+2 we can drop that option as it will become the default
(or leave it explicitly).
2025-08-17 14:06:44 +00:00
David Simansky 1d14d41f2f
Fix otel exported names (#3226)
* Fix otel exported names

* based on feedback from OTel devs these settings will become the default

* gofumpt

---------

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
2025-08-15 14:57:42 +00:00
Dave Protasowski ab9aaa0600
also add json keys to the top level config (#3213) 2025-07-07 20:41:07 +00:00
Dave Protasowski 264afa39cc
add json struct tags to the observability configs (#3212)
* add json struct tags to the observability configs

we'll be able to serialize the config to the queue proxy

* use camel case
2025-07-07 19:37:07 +00:00
Dave Protasowski 16de760af1
split off pprof server that accepts a configmap (#3210) 2025-07-07 03:10:59 +00:00
Dave Protasowski ff153ade25
[controller/observability] adjust metrics reporting for the two lane queue (#3206)
* adjust metrics reporting for the two lane queue

* wire in unfinished work metrics loop
2025-07-06 14:17:59 +00:00
Dave Protasowski fdc3131f0c
pass options to the TracerProvider constructor (#3208) 2025-07-06 10:51:59 +00:00
Dave Protasowski d601f66084
allow for stdout exporter for tracing - to allow for debugging (#3207) 2025-07-06 01:50:58 +00:00
Dave Protasowski e959f44282
[controller] OTel instrumentation (#3201)
* add workqueue metrics interface

* incorporate k8s client-go tool metrics - request latency & result

* drop custom stats reporter

* address linter

* fix boilerplate

* add some bounds checks

* Simplify int parsing and attribute handling

- use strconv.Atoi
- don't set status code attribute if we can't parse it

* add comment
2025-07-04 15:11:57 +00:00
Dave Protasowski 9435aa66de
[observability/resource] fix service name calculation (#3204)
* fix service name calculation

* drop comment

* fix linter

* simplify comment
2025-07-04 12:48:57 +00:00
Dave Protasowski 13b2dc9d2f
[observability] Default missing endpoint scheme to HTTPS (#3200)
* apply TrimSpace from config map values

* Convert opaque URLs to hiearchical ones.

When testing prometheus endpoints I entered
some.domain.com:9090/some/path

And this took `some.domain.com` as the scheme. To avoid this landmine
if we end up with an opaque URL we prepend the 'https' scheme to
the endpoint
2025-06-30 18:03:52 +00:00
Dave Protasowski 8481e7eef7
parse the endpoint as a URL to allow paths (#3197)
This is useful for Prometheus when it has the OTLP receiver on
2025-06-27 01:40:06 +00:00
Dave Protasowski 5abfb107f2
[injection/sharedmain] OTel Support (#3190)
* sharedmain changes

* go mod

* vendor

* address PR feedback

* bump semconv to v1.34.0

* drop globalviews in favour of sharedmain option

Given Views in OTel are overrides for end-users this should really be a
sharedmain option instead of a dedicated package. In OpenCensus views
were required but in OTel they are not

* PR feedback

* panic if we drift semconv version from the SDK

* fix testing import

* bump runtime instrumentation

* gofumpt file

* don't set enabled=false on init since the profiling Handler already does it
2025-06-27 00:18:06 +00:00
Dave Protasowski 5e2512c712
New observability package (#3188)
* include observability package

* go mod changes

* commit vendor

* PR feedback
2025-06-26 04:05:05 +00:00