Skip to content

Commit

Permalink
Bump to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
jirayut-opsta committed May 13, 2023
1 parent ffcbe77 commit 559013b
Show file tree
Hide file tree
Showing 40 changed files with 481 additions and 151 deletions.
7 changes: 7 additions & 0 deletions src/details/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

# gem "rails"

gem "webrick", "~> 1.8"
1 change: 1 addition & 0 deletions src/details/README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
* Ruby 2.7

```bash
bundle install
ruby details.rb 9080
```
68 changes: 56 additions & 12 deletions src/details/details.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/ruby
#
# Copyright 2017 Istio Authors
# Copyright Istio Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -129,17 +129,61 @@ def get_isbn(book, isbn_type)

def get_forward_headers(request)
headers = {}
incoming_headers = [ 'x-request-id',
'x-b3-traceid',
'x-b3-spanid',
'x-b3-parentspanid',
'x-b3-sampled',
'x-b3-flags',
'x-ot-span-context',
'x-datadog-trace-id',
'x-datadog-parent-id',
'x-datadog-sampled'
]

# Keep this in sync with the headers in productpage and reviews.
incoming_headers = [
# All applications should propagate x-request-id. This header is
# included in access log statements and is used for consistent trace
# sampling and log sampling decisions in Istio.
'x-request-id',

# Lightstep tracing header. Propagate this if you use lightstep tracing
# in Istio (see
# https://istio.io/latest/docs/tasks/observability/distributed-tracing/lightstep/)
# Note: this should probably be changed to use B3 or W3C TRACE_CONTEXT.
# Lightstep recommends using B3 or TRACE_CONTEXT and most application
# libraries from lightstep do not support x-ot-span-context.
'x-ot-span-context',

# Datadog tracing header. Propagate these headers if you use Datadog
# tracing.
'x-datadog-trace-id',
'x-datadog-parent-id',
'x-datadog-sampling-priority',

# W3C Trace Context. Compatible with OpenCensusAgent and Stackdriver Istio
# configurations.
'traceparent',
'tracestate',

# Cloud trace context. Compatible with OpenCensusAgent and Stackdriver Istio
# configurations.
'x-cloud-trace-context',

# Grpc binary trace context. Compatible with OpenCensusAgent nad
# Stackdriver Istio configurations.
'grpc-trace-bin',

# b3 trace headers. Compatible with Zipkin, OpenCensusAgent, and
# Stackdriver Istio configurations.
'x-b3-traceid',
'x-b3-spanid',
'x-b3-parentspanid',
'x-b3-sampled',
'x-b3-flags',

# SkyWalking trace headers.
'sw8',

# Application-specific headers to forward.
'end-user',
'user-agent',

# Context and session specific headers
'cookie',
'authorization',
'jwt'
]

request.each do |header, value|
if incoming_headers.include? header then
Expand Down
Empty file modified src/productpage/README.md
100644 → 100755
Empty file.

0 comments on commit 559013b

Please sign in to comment.