Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/opentelemetry-instrumentation-agno/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ def vcr_config():
return {
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"cookie",
"set-cookie",
"x-request-id",
"x-openai-organization",
],
"filter_query_parameters": ["api_key"],
"filter_post_data_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,8 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"], "decode_compressed_response": True}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
"decode_compressed_response": True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,7 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["x-api-key"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,7 @@ def instrument_with_no_content(

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {"filter_headers": ["authorization","x-api-key","api-key"], "filter_query_parameters": ["api_key"]}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,15 @@ def instrument_with_no_content(tracer_provider, logger_provider):

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization", "x-goog-api-key"]}
return {
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"x-goog-api-key",
],
"filter_query_parameters": ["api_key"],
}


@pytest.fixture(autouse=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,7 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization", "api-key"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ def clear_exporter(exporter):

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,14 @@ def before_record_request(request):
return {
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"x-amz-security-token",
"x-amz-credential",
"x-amz-signature",
"x-amz-date",
],
"filter_query_parameters": ["api_key"],
"match_on": ["method", "scheme", "host", "port", "path", "query"],
"before_record_request": before_record_request,
# Ignore AWS Instance Metadata Service (IMDS) requests that boto3 makes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def environment():
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": ["authorization", "api-key"],
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
"ignore_hosts": ["raw.githubusercontent.com"],
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -283,4 +283,7 @@ async def plan_and_apply_recipe_modifications(recipe: Recipe, modification_reque

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization", "api-key"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
20 changes: 12 additions & 8 deletions packages/opentelemetry-instrumentation-openai/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,15 @@ def clear_exporter(span_exporter):

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": [
"authorization",
"api-key",
"openai-organization",
"openai-project",
"set-cookie",
"x-request-id",
]}
return {
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"openai-organization",
"openai-project",
"set-cookie",
"x-request-id",
],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": ["authorization"],
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
"ignore_hosts": ["openaipublic.blob.core.windows.net"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ def vcr_config():
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"openai-organization",
"openai-project",
"set-cookie",
"x-request-id",
],
"filter_query_parameters": ["api_key"],
"ignore_hosts": ["openaipublic.blob.core.windows.net"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,7 @@ def instrument_with_no_content(tracer_provider, logger_provider):

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,7 @@ def smrt():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,8 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"], "decode_compressed_response": True}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
"decode_compressed_response": True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,7 @@ def instrument_with_no_content(

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization"]}
return {
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ def environment():

@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": ["authorization", "x-voyage-api-key"]}
return {
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"x-voyage-api-key",
],
"filter_query_parameters": ["api_key"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def metrics_test_context_with_no_content(logger_provider):
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": ["authorization"],
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
"allow_playback_repeats": True,
"decode_compressed_response": True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def clear_exporter(exporter_legacy):
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": ["authorization"],
"filter_headers": ["authorization", "api-key", "x-api-key"],
"filter_query_parameters": ["api_key"],
"allow_playback_repeats": True,
"decode_compressed_response": True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,11 @@ def environment():
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": ["authorization", "x-openai-api-key"],
"filter_headers": [
"authorization",
"api-key",
"x-api-key",
"x-openai-api-key",
],
"filter_query_parameters": ["api_key"],
}
9 changes: 8 additions & 1 deletion packages/traceloop-sdk/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ def environment():
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": ["authorization"],
"filter_headers": [
("authorization", "REDACTED"),
("api-key", "REDACTED"),
("x-api-key", "REDACTED"),
],
"filter_query_parameters": [
("api_key", "REDACTED"),
],
"ignore_hosts": ["openaipublic.blob.core.windows.net"],
}

Expand Down
8 changes: 7 additions & 1 deletion packages/traceloop-sdk/tests/guardrails/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ def vcr_config():
Filters authorization headers to avoid storing API keys in cassettes.
"""
return {
"filter_headers": ["authorization", "Authorization"],
"filter_headers": [
"authorization",
"Authorization",
"api-key",
"x-api-key",
],
"filter_query_parameters": ["api_key"],
"record_mode": "once",
}

Expand Down