Skip to content

Commit

Permalink
Merge pull request #1 from fschoell/feature/print_deployment_id
Browse files Browse the repository at this point in the history
print the subgraph deployment id if available as trusted header
  • Loading branch information
YaroShkvorets authored Apr 5, 2024
2 parents fa91cf1 + 47d01b8 commit b422f3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ func (s *Tier1Service) Blocks(
zap.String("key_id", auth.APIKeyID()),
zap.String("ip_address", auth.RealIP()),
)
if auth["x-deployment-id"] != "" {
fields = append(fields, zap.String("deployment_id", auth["x-deployment-id"]))
}

if cacheTag := auth.Get("X-Sf-Substreams-Cache-Tag"); cacheTag != "" {
fields = append(fields,
zap.String("cache_tag", cacheTag),
Expand Down

0 comments on commit b422f3d

Please sign in to comment.