Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lumigo-io/python_tracer into RD-1…
Browse files Browse the repository at this point in the history
…0356-migrate-scrubbing-to-core
  • Loading branch information
saartochner-lumigo committed Apr 13, 2023
2 parents 18c95a4 + a250f23 commit fefea51
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.217
current_version = 1.1.218
commit = True
tag = True

Expand Down
38 changes: 19 additions & 19 deletions layers/LAYERS36.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ Layers runtime: python3.6
----
| Region | ARN |
| --- | --- |
|US East (N. Virginia) `us-east-1`|`arn:aws:lambda:us-east-1:114300393969:layer:lumigo-python-tracer:248`|
|US East (Ohio) `us-east-2`|`arn:aws:lambda:us-east-2:114300393969:layer:lumigo-python-tracer:248`|
|US West (N. California) `us-west-1`|`arn:aws:lambda:us-west-1:114300393969:layer:lumigo-python-tracer:248`|
|US West (Oregon) `us-west-2`|`arn:aws:lambda:us-west-2:114300393969:layer:lumigo-python-tracer:248`|
|Canada (Central) `ca-central-1`|`arn:aws:lambda:ca-central-1:114300393969:layer:lumigo-python-tracer:248`|
|EU (Stockholm) `eu-north-1`|`arn:aws:lambda:eu-north-1:114300393969:layer:lumigo-python-tracer:248`|
|EU (Ireland) `eu-west-1`|`arn:aws:lambda:eu-west-1:114300393969:layer:lumigo-python-tracer:248`|
|EU (London) `eu-west-2`|`arn:aws:lambda:eu-west-2:114300393969:layer:lumigo-python-tracer:248`|
|EU (Paris) `eu-west-3`|`arn:aws:lambda:eu-west-3:114300393969:layer:lumigo-python-tracer:248`|
|EU (Frankfurt) `eu-central-1`|`arn:aws:lambda:eu-central-1:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Tokyo) `ap-northeast-1`|`arn:aws:lambda:ap-northeast-1:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Seoul) `ap-northeast-2`|`arn:aws:lambda:ap-northeast-2:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Singapore) `ap-southeast-1`|`arn:aws:lambda:ap-southeast-1:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Sydney) `ap-southeast-2`|`arn:aws:lambda:ap-southeast-2:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Hong Kong) `ap-east-1`|`arn:aws:lambda:ap-east-1:114300393969:layer:lumigo-python-tracer:207`|
|Asia Pacific (Mumbai) `ap-south-1`|`arn:aws:lambda:ap-south-1:114300393969:layer:lumigo-python-tracer:248`|
|South America (São Paulo) `sa-east-1`|`arn:aws:lambda:sa-east-1:114300393969:layer:lumigo-python-tracer:248`|
|Middle East (Bahrain) `me-south-1`|`arn:aws:lambda:me-south-1:114300393969:layer:lumigo-python-tracer:207`|
|Africa (Cape Town) `af-south-1`|`arn:aws:lambda:af-south-1:114300393969:layer:lumigo-python-tracer:70`|
|US East (N. Virginia) `us-east-1`|`arn:aws:lambda:us-east-1:114300393969:layer:lumigo-python-tracer:249`|
|US East (Ohio) `us-east-2`|`arn:aws:lambda:us-east-2:114300393969:layer:lumigo-python-tracer:249`|
|US West (N. California) `us-west-1`|`arn:aws:lambda:us-west-1:114300393969:layer:lumigo-python-tracer:249`|
|US West (Oregon) `us-west-2`|`arn:aws:lambda:us-west-2:114300393969:layer:lumigo-python-tracer:249`|
|Canada (Central) `ca-central-1`|`arn:aws:lambda:ca-central-1:114300393969:layer:lumigo-python-tracer:249`|
|EU (Stockholm) `eu-north-1`|`arn:aws:lambda:eu-north-1:114300393969:layer:lumigo-python-tracer:249`|
|EU (Ireland) `eu-west-1`|`arn:aws:lambda:eu-west-1:114300393969:layer:lumigo-python-tracer:249`|
|EU (London) `eu-west-2`|`arn:aws:lambda:eu-west-2:114300393969:layer:lumigo-python-tracer:249`|
|EU (Paris) `eu-west-3`|`arn:aws:lambda:eu-west-3:114300393969:layer:lumigo-python-tracer:249`|
|EU (Frankfurt) `eu-central-1`|`arn:aws:lambda:eu-central-1:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Tokyo) `ap-northeast-1`|`arn:aws:lambda:ap-northeast-1:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Seoul) `ap-northeast-2`|`arn:aws:lambda:ap-northeast-2:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Singapore) `ap-southeast-1`|`arn:aws:lambda:ap-southeast-1:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Sydney) `ap-southeast-2`|`arn:aws:lambda:ap-southeast-2:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Hong Kong) `ap-east-1`|`arn:aws:lambda:ap-east-1:114300393969:layer:lumigo-python-tracer:208`|
|Asia Pacific (Mumbai) `ap-south-1`|`arn:aws:lambda:ap-south-1:114300393969:layer:lumigo-python-tracer:249`|
|South America (São Paulo) `sa-east-1`|`arn:aws:lambda:sa-east-1:114300393969:layer:lumigo-python-tracer:249`|
|Middle East (Bahrain) `me-south-1`|`arn:aws:lambda:me-south-1:114300393969:layer:lumigo-python-tracer:208`|
|Africa (Cape Town) `af-south-1`|`arn:aws:lambda:af-south-1:114300393969:layer:lumigo-python-tracer:71`|
38 changes: 19 additions & 19 deletions layers/LAYERS37.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ Layers runtime: python3.7
----
| Region | ARN |
| --- | --- |
|US East (N. Virginia) `us-east-1`|`arn:aws:lambda:us-east-1:114300393969:layer:lumigo-python-tracer:248`|
|US East (Ohio) `us-east-2`|`arn:aws:lambda:us-east-2:114300393969:layer:lumigo-python-tracer:248`|
|US West (N. California) `us-west-1`|`arn:aws:lambda:us-west-1:114300393969:layer:lumigo-python-tracer:248`|
|US West (Oregon) `us-west-2`|`arn:aws:lambda:us-west-2:114300393969:layer:lumigo-python-tracer:248`|
|Canada (Central) `ca-central-1`|`arn:aws:lambda:ca-central-1:114300393969:layer:lumigo-python-tracer:248`|
|EU (Stockholm) `eu-north-1`|`arn:aws:lambda:eu-north-1:114300393969:layer:lumigo-python-tracer:248`|
|EU (Ireland) `eu-west-1`|`arn:aws:lambda:eu-west-1:114300393969:layer:lumigo-python-tracer:248`|
|EU (London) `eu-west-2`|`arn:aws:lambda:eu-west-2:114300393969:layer:lumigo-python-tracer:248`|
|EU (Paris) `eu-west-3`|`arn:aws:lambda:eu-west-3:114300393969:layer:lumigo-python-tracer:248`|
|EU (Frankfurt) `eu-central-1`|`arn:aws:lambda:eu-central-1:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Tokyo) `ap-northeast-1`|`arn:aws:lambda:ap-northeast-1:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Seoul) `ap-northeast-2`|`arn:aws:lambda:ap-northeast-2:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Singapore) `ap-southeast-1`|`arn:aws:lambda:ap-southeast-1:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Sydney) `ap-southeast-2`|`arn:aws:lambda:ap-southeast-2:114300393969:layer:lumigo-python-tracer:248`|
|Asia Pacific (Hong Kong) `ap-east-1`|`arn:aws:lambda:ap-east-1:114300393969:layer:lumigo-python-tracer:207`|
|Asia Pacific (Mumbai) `ap-south-1`|`arn:aws:lambda:ap-south-1:114300393969:layer:lumigo-python-tracer:248`|
|South America (São Paulo) `sa-east-1`|`arn:aws:lambda:sa-east-1:114300393969:layer:lumigo-python-tracer:248`|
|Middle East (Bahrain) `me-south-1`|`arn:aws:lambda:me-south-1:114300393969:layer:lumigo-python-tracer:207`|
|Africa (Cape Town) `af-south-1`|`arn:aws:lambda:af-south-1:114300393969:layer:lumigo-python-tracer:70`|
|US East (N. Virginia) `us-east-1`|`arn:aws:lambda:us-east-1:114300393969:layer:lumigo-python-tracer:249`|
|US East (Ohio) `us-east-2`|`arn:aws:lambda:us-east-2:114300393969:layer:lumigo-python-tracer:249`|
|US West (N. California) `us-west-1`|`arn:aws:lambda:us-west-1:114300393969:layer:lumigo-python-tracer:249`|
|US West (Oregon) `us-west-2`|`arn:aws:lambda:us-west-2:114300393969:layer:lumigo-python-tracer:249`|
|Canada (Central) `ca-central-1`|`arn:aws:lambda:ca-central-1:114300393969:layer:lumigo-python-tracer:249`|
|EU (Stockholm) `eu-north-1`|`arn:aws:lambda:eu-north-1:114300393969:layer:lumigo-python-tracer:249`|
|EU (Ireland) `eu-west-1`|`arn:aws:lambda:eu-west-1:114300393969:layer:lumigo-python-tracer:249`|
|EU (London) `eu-west-2`|`arn:aws:lambda:eu-west-2:114300393969:layer:lumigo-python-tracer:249`|
|EU (Paris) `eu-west-3`|`arn:aws:lambda:eu-west-3:114300393969:layer:lumigo-python-tracer:249`|
|EU (Frankfurt) `eu-central-1`|`arn:aws:lambda:eu-central-1:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Tokyo) `ap-northeast-1`|`arn:aws:lambda:ap-northeast-1:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Seoul) `ap-northeast-2`|`arn:aws:lambda:ap-northeast-2:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Singapore) `ap-southeast-1`|`arn:aws:lambda:ap-southeast-1:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Sydney) `ap-southeast-2`|`arn:aws:lambda:ap-southeast-2:114300393969:layer:lumigo-python-tracer:249`|
|Asia Pacific (Hong Kong) `ap-east-1`|`arn:aws:lambda:ap-east-1:114300393969:layer:lumigo-python-tracer:208`|
|Asia Pacific (Mumbai) `ap-south-1`|`arn:aws:lambda:ap-south-1:114300393969:layer:lumigo-python-tracer:249`|
|South America (São Paulo) `sa-east-1`|`arn:aws:lambda:sa-east-1:114300393969:layer:lumigo-python-tracer:249`|
|Middle East (Bahrain) `me-south-1`|`arn:aws:lambda:me-south-1:114300393969:layer:lumigo-python-tracer:208`|
|Africa (Cape Town) `af-south-1`|`arn:aws:lambda:af-south-1:114300393969:layer:lumigo-python-tracer:71`|
2 changes: 1 addition & 1 deletion src/lumigo_tracer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.217
1.1.218
28 changes: 28 additions & 0 deletions src/lumigo_tracer/lumigo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
from typing import Any, Dict, List, Optional, Pattern, TypeVar, Union

from lumigo_core.configuration import (
MASKING_REGEX_ENVIRONMENT,
MASKING_REGEX_HTTP_QUERY_PARAMS,
MASKING_REGEX_HTTP_REQUEST_BODIES,
MASKING_REGEX_HTTP_REQUEST_HEADERS,
MASKING_REGEX_HTTP_RESPONSE_BODIES,
MASKING_REGEX_HTTP_RESPONSE_HEADERS,
CoreConfiguration,
create_regex_from_list,
parse_regex_from_env,
Expand Down Expand Up @@ -93,6 +99,12 @@ class Configuration:
auto_tag: List[str] = []
skip_collecting_http_body: bool = False
propagate_w3c: bool = False
secret_masking_regex_http_request_bodies: Optional[Pattern[str]] = None
secret_masking_regex_http_request_headers: Optional[Pattern[str]] = None
secret_masking_regex_http_response_bodies: Optional[Pattern[str]] = None
secret_masking_regex_http_response_headers: Optional[Pattern[str]] = None
secret_masking_regex_http_query_params: Optional[Pattern[str]] = None
secret_masking_regex_environment: Optional[Pattern[str]] = None


def config(
Expand Down Expand Up @@ -196,6 +208,22 @@ def config(
or skip_collecting_http_body # noqa: W503
or os.environ.get(SKIP_COLLECTING_HTTP_BODY_KEY, "false").lower() == "true" # noqa: W503
)
Configuration.secret_masking_regex_http_request_bodies = parse_regex_from_env(
MASKING_REGEX_HTTP_REQUEST_BODIES
)
Configuration.secret_masking_regex_http_request_headers = parse_regex_from_env(
MASKING_REGEX_HTTP_REQUEST_HEADERS
)
Configuration.secret_masking_regex_http_response_bodies = parse_regex_from_env(
MASKING_REGEX_HTTP_RESPONSE_BODIES
)
Configuration.secret_masking_regex_http_response_headers = parse_regex_from_env(
MASKING_REGEX_HTTP_RESPONSE_HEADERS
)
Configuration.secret_masking_regex_http_query_params = parse_regex_from_env(
MASKING_REGEX_HTTP_QUERY_PARAMS
)
Configuration.secret_masking_regex_environment = parse_regex_from_env(MASKING_REGEX_ENVIRONMENT)


def is_span_has_error(span: dict) -> bool: # type: ignore[type-arg]
Expand Down

0 comments on commit fefea51

Please sign in to comment.