core/config: add config version, additional telemetry (#4645)

* core/config: add config version, additional telemetry

* typo
This commit is contained in:
Caleb Doxsey 2023-10-27 15:16:40 -06:00 committed by GitHub
parent dd7e3b993c
commit ae420f01c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 857 additions and 766 deletions

View file

@ -18,6 +18,7 @@ import (
"github.com/pomerium/pomerium/config"
"github.com/pomerium/pomerium/internal/telemetry"
"github.com/pomerium/pomerium/internal/telemetry/trace"
)
var (
@ -32,6 +33,9 @@ func (b *Builder) BuildBootstrap(
cfg *config.Config,
fullyStatic bool,
) (bootstrap *envoy_config_bootstrap_v3.Bootstrap, err error) {
ctx, span := trace.StartSpan(ctx, "envoyconfig.Builder.BuildBootstrap")
defer span.End()
bootstrap = new(envoy_config_bootstrap_v3.Bootstrap)
bootstrap.Admin, err = b.BuildBootstrapAdmin(cfg)
@ -164,6 +168,9 @@ func (b *Builder) BuildBootstrapStaticResources(
cfg *config.Config,
fullyStatic bool,
) (staticResources *envoy_config_bootstrap_v3.Bootstrap_StaticResources, err error) {
ctx, span := trace.StartSpan(ctx, "envoyconfig.Builder.BuildBootstrapStaticResources")
defer span.End()
staticResources = new(envoy_config_bootstrap_v3.Bootstrap_StaticResources)
if fullyStatic {