forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[exporter/honeycombmarker] Fix default url and dataset_slug (open-tel…
…emetry#29309) **Description:** Fixes an issue with an incorrect default url. Also fixes issue where dataset slug was required. **Link to tracking Issue:** <Issue number if applicable> Related to open-telemetry#27666 **Testing:** <Describe what testing was performed and which tests were added.> Added new tests and tested manually. **Documentation:** <Describe the documentation added.> Updated up README
- Loading branch information
1 parent
406ab38
commit 6020982
Showing
8 changed files
with
105 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: bug_fix | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: honeycombmarkerexporter | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Fix default api_url and dataset_slug | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [29309] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
@@ -0,0 +1,18 @@ | ||
# Honeycomb Marker Exporter | ||
|
||
This exporter allows creating markers, via the Honeycomb Markers API, based on the look of incoming telemetry. | ||
This exporter allows creating [markers](https://docs.honeycomb.io/working-with-your-data/markers/), via the [Honeycomb Markers API](https://docs.honeycomb.io/api/tag/Markers#operation/createMarker), based on the look of incoming telemetry. | ||
|
||
The following configuration options are supported: | ||
|
||
* `api_key` (Required): This is the API key for your Honeycomb account. | ||
* `api_url` (Required): This sets the hostname to send marker data to. | ||
* `api_url` (Optional): This sets the hostname to send marker data to. If not set, will default to `https://api.honeycomb.io/` | ||
* `markers` (Required): This is a list of configurations to create an event marker. | ||
* `type` (Required): Specifies the marker type. | ||
* `message_key`: This attribute will be used as the message. It describes the event marker. If necessary the value will be converted to a string. | ||
* `url_key`: This attribute will be used as the url. It can be accessed through the event marker in Honeycomb. If necessary the value will be converted to a string. | ||
* `rules` (Required): This is a list of OTTL rules that determine when to create an event marker. | ||
* `log_conditions` (Required): A list of ottllog conditions that determine a match | ||
Example: | ||
* `type` (Required): Specifies the marker type. | ||
* `rules` (Required): This is a list of [OTTL](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl) rules that determine when to create an event marker. | ||
* `log_conditions` (Required): A list of [OTTL log](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottllog) conditions that determine a match. The marker will be created if **ANY** condition matches. | ||
* `dataset_slug` (Optional): The dataset in which to create the marker. If not set, will default to `__all__`. | ||
* `message_key` (Optional): The key of the attribute whose value will be used as the marker's message. If necessary the value will be converted to a string. | ||
* `url_key` (Optional): The key of the attribute whose value will be used as the marker's url. If necessary the value will be converted to a string. | ||
|
||
Example: | ||
```yaml | ||
exporters: | ||
honeycombmarker: | ||
api_key: "environment-api-key" | ||
api_url: "https://api.honeycomb.io" | ||
api_key: {{env:HONEYCOMB_API_KEY}} | ||
markers: | ||
- type: "marker-type" | ||
message_key: "marker-message" | ||
url_key: "marker-url" | ||
dataset_slug: "__all__" | ||
# Creates a new marker anytime the exporter sees a k8s event with a reason of Backoff | ||
- type: k8s-backoff-events | ||
rules: | ||
- log_conditions: | ||
- body == "test" | ||
``` | ||
- IsMap(body) and IsMap(body["object"] and body["object"]["reason"] == "Backoff" | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters