Skip to content

Commit

Permalink
fix: add maps for compatibility (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethyates committed Nov 18, 2023
1 parent c33c286 commit 9da548a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions request/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ var LowCardinalityKeys = map[Key]bool{
TenantKey: true,
}

var KeyMap = map[any]string{
ConnectionKey: "Connection",
IDKey: "Request-Id",
OperationKey: "Operation",
OriginatorKey: "Request-Originator",
TenantKey: "Tenant",
TimestampKey: "RequestTS",
URLKey: "Request-Url",
UserKey: "User-Id",
IntegrationKey: "Integration",
}

var MetricsKeyMap = map[any]string{
OperationKey: "operation",
OriginatorKey: "requestOriginator",
TenantKey: "tenant",
ConnectionKey: "connection",
IntegrationKey: "integration",
}

// Setter is a function that adds a string to the context
type Setter func(ctx context.Context, v string) context.Context

Expand Down

0 comments on commit 9da548a

Please sign in to comment.