Skip to content

Commit cb124db

Browse files
authored
trace: honour tracing_service_name config directive (#2608)
1 parent d8f7f32 commit cb124db

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix: respect the tracing_service_name config variable
2+
3+
https://github.com/cs3org/reva/pull/2608

cmd/revad/runtime/runtime.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func initServers(mainConf map[string]interface{}, log *zerolog.Logger) map[strin
149149
}
150150

151151
func initTracing(conf *coreConf) {
152-
rtrace.SetTraceProvider(conf.TracingCollector, conf.TracingEndpoint)
152+
rtrace.SetTraceProvider(conf.TracingCollector, conf.TracingEndpoint, conf.TracingServiceName)
153153
}
154154

155155
func initCPUCount(conf *coreConf, log *zerolog.Logger) {

docs/content/en/docs/config/packages/auth/manager/oidcmapping/_index.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,16 @@ gatewaysvc = ""
5656
{{< /highlight >}}
5757
{{% /dir %}}
5858

59-
{{% dir name="userprovidersvc" type="string" default="" %}}
60-
The endpoint at which the GRPC userprovider is exposed. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L65)
61-
{{< highlight toml >}}
62-
[auth.manager.oidcmapping]
63-
userprovidersvc = ""
64-
{{< /highlight >}}
65-
{{% /dir %}}
66-
6759
{{% dir name="users_mapping" type="string" default="" %}}
68-
The optional OIDC users mapping file path [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L66)
60+
The optional OIDC users mapping file path [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L65)
6961
{{< highlight toml >}}
7062
[auth.manager.oidcmapping]
7163
users_mapping = ""
7264
{{< /highlight >}}
7365
{{% /dir %}}
7466

7567
{{% dir name="group_claim" type="string" default="" %}}
76-
The group claim to be looked up to map the user (default to 'groups'). [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L67)
68+
The group claim to be looked up to map the user (default to 'groups'). [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L66)
7769
{{< highlight toml >}}
7870
[auth.manager.oidcmapping]
7971
group_claim = ""

pkg/trace/trace.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ var (
4040
)
4141

4242
// SetTraceProvider sets the TracerProvider at a package level.
43-
func SetTraceProvider(collectorEndpoint string, agentEndpoint string) {
43+
func SetTraceProvider(collectorEndpoint string, agentEndpoint, serviceName string) {
44+
// default to 'reva' as service name if not set
45+
if serviceName == "" {
46+
serviceName = "reva"
47+
}
48+
4449
var exp *jaeger.Exporter
4550
var err error
4651

@@ -75,7 +80,7 @@ func SetTraceProvider(collectorEndpoint string, agentEndpoint string) {
7580
sdktrace.WithBatcher(exp),
7681
sdktrace.WithResource(resource.NewWithAttributes(
7782
semconv.SchemaURL,
78-
semconv.ServiceNameKey.String("reva"),
83+
semconv.ServiceNameKey.String(serviceName),
7984
)),
8085
)
8186
}

0 commit comments

Comments
 (0)