Skip to content

Conversation

@RangelReale
Copy link

This PR adds an option to customize span name.

	hook := newTracingHook(
		"",
		WithTracerProvider(provider),
		WithSpanName(func(hook TracingHook, defaultName string) string {
			if hook == TracingHookProcess {
				return "redis." + defaultName
			}
			return defaultName
		}),
	)

@chayim
Copy link
Contributor

chayim commented Mar 28, 2023

@RangelReale What's your use case?

@RangelReale
Copy link
Author

RangelReale commented Mar 28, 2023

@RangelReale What's your use case?

It's mostly because in Datadog when you are looking at the latest traces, the only thing shown is the span name. So I see "GET <url>" for http, "db.query", "db.tx" for sql, but for redis I see just "get", "put", I wanted to at least show "redis.get" and "redis.put", to at least know what it is for.

@ndyakov
Copy link
Member

ndyakov commented Jun 5, 2025

Closing for inactivity, feel free to reopen when synced with master.

@ndyakov ndyakov closed this Jun 5, 2025
@RangelReale
Copy link
Author

Synced with master.

@RangelReale
Copy link
Author

Can't see to find a way to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants