Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #63 from signalfx/rename-server-timing
Browse files Browse the repository at this point in the history
Renamed SPLUNK_CONTEXT_SERVER_TIMING_ENABLED to SPLUNK_TRACE_RESPONSE_HEADER_ENABLED
  • Loading branch information
owais authored Apr 23, 2021
2 parents 0cc565c + 73056a0 commit 8ede7da
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ default value:
| `jaeger_endpoint` | `SIGNALFX_ENDPOINT_URL` | `'http://localhost:9080/v1/trace'` | The endpoint the tracer sends spans to. Send spans to a Smart Agent, OpenTelemetry Collector, or a SignalFx ingest endpoint. |
| `jaeger_password` | `SIGNALFX_ACCESS_TOKEN` | `None` | The SignalFx organization access token. |
| `N/A` | `SIGNALFX_RECORDED_VALUE_MAX_LENGTH` | `1200` | The maximum length an attribute value can have. Values longer than this are truncated. |
| `N/A` | `SPLUNK_CONTEXT_SERVER_TIMING_ENABLED` | `true` | Enables adding Server-Timing header to HTTP responses. |
| `N/A` | `SPLUNK_TRACE_RESPONSE_HEADER_ENABLED` | `true` | Enables adding Server-Timing header to HTTP responses. |

## Automatically instrument a Python application

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_falcon(session):

@nox.session(python=("3.5", "3.6", "3.7"), reuse_venv=True)
def falcon_via_bootstrap(session):
install_unit_tests(session, "falcon>=2.0", "requests")
install_unit_tests(session, "falcon>=2.0,<3.0", "requests")
session.run("sfx-py-trace-bootstrap")
pip_check(session)
pip_freeze(session)
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ docker
elasticsearch
flask
flake8
falcon
falcon<3.0
mock
mockupdb
psycopg2
Expand Down
2 changes: 1 addition & 1 deletion signalfx_tracing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ def padded_hex(num):


def is_trace_response_header_enabled():
return is_truthy(os.environ.get("SPLUNK_CONTEXT_SERVER_TIMING_ENABLED", "true"))
return is_truthy(os.environ.get("SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", "true"))
4 changes: 2 additions & 2 deletions tests/unit/libraries/falcon_/test_falcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_trace_with_custom_config(self):
}

def test_response_trace_header_no_server_timing(self):
os.environ['SPLUNK_CONTEXT_SERVER_TIMING_ENABLED'] = 'false'
os.environ['SPLUNK_TRACE_RESPONSE_HEADER_ENABLED'] = 'false'
tracer = MockTracer()
instrument(tracer)
app = self.make_app()
Expand All @@ -94,7 +94,7 @@ def test_response_trace_header_no_server_timing(self):

assert 'access-control-expose-headers' not in result.headers
assert 'server-timing' not in result.headers
del os.environ['SPLUNK_CONTEXT_SERVER_TIMING_ENABLED']
del os.environ['SPLUNK_TRACE_RESPONSE_HEADER_ENABLED']

def test_response_trace_header_server_timing(self):
tracer = MockTracer()
Expand Down

0 comments on commit 8ede7da

Please sign in to comment.