[#84] add tracing support #123
No reviewers
TrueCloudLab/storage-services-developers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#123
Loading…
Reference in a new issue
No description provided.
Delete branch "pogpp/frostfs-s3-gw:feature/add_tracing_support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: Pavel Pogodaev p.pogodaev@yadro.com
0b34b52600
tod19a68e692
Looks good! Let me try it on my machine.
@ -0,0 +77,4 @@
ctx = extractHTTPTraceInfo(ctx, r)
opts = append(opts, trace.WithAttributes(
attribute.String("http.client_address", r.RemoteAddr),
attribute.String("http.path", r.Host),
I suggest to use
s3
prefix instead ofhttp
. S3 protocol works on top of http anyway, but it would be easier to distinguish from http gateway.@ -98,6 +98,11 @@ const ( // Settings.
cfgPProfEnabled = "pprof.enabled"
cfgPProfAddress = "pprof.address"
// Tracing ...
...
@ -67,0 +68,4 @@
enabled: true
exporter: "otlp_grpc"
endpoint: "localhost:4318"
Update
docs/configuration.md
@ -0,0 +73,4 @@
}
// StartHTTPServerSpan starts root HTTP server span.
func StartHTTPServerSpan(ctx context.Context, r *http.Request, operationName string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
It seems we can omit explicit
ctx contextContext
param and user.Context()
@ -0,0 +16,4 @@
return func(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
appCtx, span := StartHTTPServerSpan(ctx, r, "REQUEST")
Let's write
REQUEST S3
instead of justREQUEST
d19a68e692
toeb47941cd7
eb47941cd7
to0b1e4a3d4f
@pogpp Please run
pre-commit run --all
and fix issues0b1e4a3d4f
to547996bc6b
I still have some issues with
pre-commit
:547996bc6b
to16fbf3bab0
@ -502,0 +515,4 @@
|-------------|----------|---------------|-----------------------|-----------------------------------------|
| `enabled` | `bool` | yes | `true` | Flag to enable the service. |
| `exporter` | `string` | yes | `otlp_grpc` | Type of tracing exporter. |
| `endpoint` | `string` | yes | `localhost:4318` | Address that service listener binds to. |
Actually, currently there are not default values for tracing.
To be more precise current default values:
false
,""
,""
@pogpp It seems your last force push didn't change anything
253a48cc4b
tob1de3b6e77
b1de3b6e77
to448e550d75
448e550d75
to4e1fd9589b
pogpp referenced this pull request2024-08-30 09:16:42 +00:00