Skip to content

Remove event.dataset from integration with elastic-apm #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 14, 2021
Merged
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: 1 addition & 1 deletion .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pipeline {
axes {
axis {
name 'VERSION'
values '2.7', '3.5', '3.6', '3.7', '3.8'
values '2.7', '3.6', '3.7', '3.8'
}
}
stages {
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

* Remove python 3.5 support [#69]

## 1.0.2 (2021-09-22)

* Fix an signature mismatch between `StdLibFormatter` and `logging.Formatter`,
Expand Down
1 change: 0 additions & 1 deletion ecs_logging/_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def format_to_ecs(self, record):
)
extras.setdefault("trace.id", extras.pop("elasticapm_trace_id", None))
extras.setdefault("service.name", extras.pop("elasticapm_service_name", None))
extras.setdefault("event.dataset", extras.pop("elasticapm_event_dataset", None))

# Merge in any keys that were set within 'extra={...}'
for field, value in extras.items():
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def tests_impl(session):
)


@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
@nox.session(python=["2.7", "3.6", "3.7", "3.8"])
def test(session):
tests_impl(session)

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ classifiers = [
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand All @@ -27,7 +26,7 @@ classifiers = [
requires = [
"backports.functools-lru-cache; python_version < '3.3'"
]
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"

[tool.flit.metadata.requires-extra]
develop = [
Expand Down
4 changes: 0 additions & 4 deletions tests/test_apm.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def test_elasticapm_structlog_log_correlation_ecs_fields(spec_validator, apm):
"trace": {"id": trace_id},
"transaction": {"id": transaction_id},
"service": {"name": "apm-service"},
"event": {"dataset": "apm-service"},
}


Expand Down Expand Up @@ -100,7 +99,6 @@ def test_elastic_apm_stdlib_no_filter_log_correlation_ecs_fields(apm):
"trace": {"id": trace_id},
"transaction": {"id": transaction_id},
"service": {"name": "apm-service"},
"event": {"dataset": "apm-service"},
}


Expand Down Expand Up @@ -145,7 +143,6 @@ def test_elastic_apm_stdlib_with_filter_log_correlation_ecs_fields(apm):
"trace": {"id": trace_id},
"transaction": {"id": transaction_id},
"service": {"name": "apm-service"},
"event": {"dataset": "apm-service"},
}


Expand Down Expand Up @@ -191,5 +188,4 @@ def test_elastic_apm_stdlib_exclude_fields(apm):
"message": "test message",
"trace": {"id": trace_id},
"service": {"name": "apm-service"},
"event": {"dataset": "apm-service"},
}
2 changes: 0 additions & 2 deletions tests/test_structlog_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def __repr__(self):
def make_event_dict():
return {
"event": "test message",
"event.dataset": "agent",
"log.logger": "logger-name",
"foo": "bar",
"baz": NotSerializable(),
Expand All @@ -56,7 +55,6 @@ def test_event_dict_formatted(time, spec_validator):
'"message":"test message",'
'"baz":"<NotSerializable>",'
'"ecs":{"version":"1.6.0"},'
'"event":{"dataset":"agent"},'
'"foo":"bar",'
'"log":{"logger":"logger-name"}}'
)
Expand Down