Newrelic-telemetry-sdk

Latest version: v0.5.1

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.3.1

Deprecations

* `Metric.from_value` will be removed, replaced with metric constructor
* In a future release, `CountMetric` / `SummaryMetric` `interval_ms` must be specified
* `Harvester.record` is removed and replaced with `Harvester.batch.record` (or simply `Batch.record`)
* `MetricBatch.record` method is removed, replaced with `MetricBatch.record_gauge`, `MetricBatch.record_count`, `MetricBatch.record_summary`

New Features

Clients now have a `Client.close` interface to force close the connection.

All clients support explicitly closing the persistent TCP connection to New Relic via the `Client.close` method.

Bug Fixes

Harvester crashes when used with EventClient (23)

When using the harvester with an event client, the harvester crashed when attempting to flush the data. This issue has now been fixed.

0.3.0

Backwards Incompatible Changes

The `compression_threshold` argument has been removed from `SpanClient`, `MetricClient`, and `EventClient` constructors. Code that omits `compression_threshold` from the client argument list will not be impacted.

Example (OK)
python
import os
from newrelic_telemetry_sdk import MetricClient

metric_client = MetricClient(os.environ['NEW_RELIC_INSERT_KEY'])


Example (Incompatible)
python
import os
from newrelic_telemetry_sdk import MetricClient

compression_threshold has been removed, so the following code will result in an exception
metric_client = MetricClient(os.environ['NEW_RELIC_INSERT_KEY'], compression_threshold=0)


API Additions

Users can now override the HTTP port used by the telemetry SDK in all clients. (20)

Port can now be overridden via arguments to clients.

Example
python
import os
from newrelic_telemetry_sdk import SpanClient

span_client = SpanClient(os.environ['NEW_RELIC_INSERT_KEY'], port=8000)

0.2.5

Deprecations

The `compression_threshold` argument to all clients is now deprecated (18)

In a future release, all payloads will be gzip compressed. When using the `compression_threshold` argument, a `DeprecationWarning` will be printed. For forward compatibility, use of the `compression_thresold` argument in `SpanClient`, `MetricClient`, and `EventClient` should be discontinued.

0.2.4

New Features
Support for sending Events to New Relic. (16)

[Events](https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/introduction-event-api#find-data) can now be sent to New Relic via the SDK! 🎉 See the documentation for details!

Bug Fixes
Batch tags without a copy method raise an AttributeError. (15)

Using a custom mapping class without a copy method for tags within batches resulted in a crash. Custom mapping classes are now properly converted to a dict for internal use by batches in the New Relic Python SDK.

0.2.3

API Additions

Add helpers for periodic sending of batched data (12)

`SpanBatch`, `MetricBatch`, and `Harvester` classes have been added. The `Harvester` will send data aggregated in a batch to a `Client`'s `send_batch` method at a periodic interval. These classes may be used as helpers to send batch data to New Relic without blocking the application thread. All network activity in the `Harvester` occurs on a separate thread.

0.2.2

Bug Fixes

Tag mappings without a `copy` method raise an `AttributeError` (9)

Using a custom mapping class without a `copy` method for `tags` on a `Span` type resulted in a crash. Custom mapping classes are now properly converted to a `dict` for internal use by the New Relic Python SDK.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.