Skip to content
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

Add SPLUNK_REALM to instrumentation library configuration #148

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

flands
Copy link
Contributor

@flands flands commented Nov 11, 2021

Addresses #140

@flands flands requested review from a team as code owners November 11, 2021 13:47
| `SPLUNK_TRACE_RESPONSE_HEADER_ENABLED` (`true`) | Whether `Server-Timing` header is added to HTTP responses. [2] |
| `SPLUNK_METRICS_ENDPOINT` () | Endpoint for metrics data ingest. |
| `SPLUNK_METRICS_ENDPOINT` () | Endpoint for metrics data ingest. |
| `SPLUNK_REALM` (`none`) | Which realm to send exported data. [2] |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other vars don't have a none default value and instead just default to nothing/empty string. Do we need a special default value ("none" string literal) for SPLUNK_REALM?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to avoid using empty strings in general and use none in such cases in general: open-telemetry/opentelemetry-specification#2102

It's also consistent with setting exporters, propagators (was that PR merged already?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense as it allows users to easily "unset" a variable that has a non-none default but in case the variable does not have a default, do we want to specify none as the default value or just say it has no default? I know it does not make a difference in implementation but when reading the spec it can be confusing when some values do not have a default value while others have none as default value while both having the same net effect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, none does not have any special meaning and is an alternate way to setting a variable to an empty string or removing the variable from the env. Keeping that in mind, we should either have none as default value for all vars that don't have a default or not have it as default anywhere for the sake of consistency.

Either way it does not affect implementations and the net effect is the same so not a hard blocker for me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other vars don't have a none default value and instead just default to nothing/empty string

@owais Can you give an example of such enum-type configuration, please?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

image

image

image

None of these have any default values. How do we decide when something does not have a default vs when something has default set to none?

Copy link
Contributor

@pellared pellared Nov 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none is for enum value (more).

Regarding provided examples, I think that only the Kubernetes configs could be enums. But they look more like dummy strings at the moment. Moreover, they are in experimental status.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense and like I said this is not a hard blocker for me. Just that it can be confusing to me as an end user when I see a dozen options with some listing the default as none while others listing no default value and all of them behaving the same. As a consumer, I'd prefer a library to have uniform defaults/noop representations.

Feel free to resolve this if you'd like :)

Copy link
Contributor

@owais owais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to submit pending comment 🤦

| `SPLUNK_TRACE_RESPONSE_HEADER_ENABLED` (`true`) | Whether `Server-Timing` header is added to HTTP responses. [2] |
| `SPLUNK_METRICS_ENDPOINT` () | Endpoint for metrics data ingest. |
| `SPLUNK_METRICS_ENDPOINT` () | Endpoint for metrics data ingest. |
| `SPLUNK_REALM` (`none`) | Which realm to send exported data. [2] |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, none does not have any special meaning and is an alternate way to setting a variable to an empty string or removing the variable from the env. Keeping that in mind, we should either have none as default value for all vars that don't have a default or not have it as default anywhere for the sake of consistency.

Either way it does not affect implementations and the net effect is the same so not a hard blocker for me.

@pellared
Copy link
Contributor

pellared commented Dec 6, 2021

@MrAlias PTAL

@flands flands merged commit 00cc607 into main Dec 8, 2021
@flands flands deleted the flands/realm branch December 8, 2021 20:09
flands added a commit that referenced this pull request Dec 9, 2021
flands added a commit that referenced this pull request Dec 9, 2021
flands added a commit that referenced this pull request Dec 9, 2021
* Add behaviors

Refactor profiling into:

- Behaviors
- Configuration
- Semantic Conventions

Behavior is new to cover specifics of some subset. Its goal is to drive
consistent across GDI repositories.

* Update specification/behaviors.md

Co-authored-by: jason plumb <[email protected]>

* Minor fixes in RUM spec (#155)

- Add different statuses per semantic conventions section - everything but RUM is stable, RUM is feature-freeze (same as in the configuration doc)

- Change os.type to os.name - I think it was a bug previously since both OTel spec and Android RUM actually use os.name

* Add `SPLUNK_REALM` to instrumentation library configuration (#148)

Addresses #140

* Add behaviors

Refactor profiling into:

- Behaviors
- Configuration
- Semantic Conventions

Behavior is new to cover specifics of some subset. Its goal is to drive
consistent across GDI repositories.

* Resolve conflict

- Resolve conflict the conflict 
- Remove the line number from the hyperlink as it may change.

* Update specification/behaviors.md

Co-authored-by: Robert Pająk <[email protected]>

* Update specification/semantic_conventions.md

Co-authored-by: Robert Pająk <[email protected]>

* Update specification/semantic_conventions.md

Co-authored-by: Robert Pająk <[email protected]>

* Update specification/semantic_conventions.md

Co-authored-by: Robert Pająk <[email protected]>

* Update specification/semantic_conventions.md

Co-authored-by: Robert Pająk <[email protected]>

* Update specification/behaviors.md

Co-authored-by: Robert Pająk <[email protected]>

* Address feedback

* Update CHANGELOG

* Update CHANGELOG.md

* Update specification/behaviors.md

* Update behaviors.md

Co-authored-by: jason plumb <[email protected]>
Co-authored-by: Mateusz Rzeszutek <[email protected]>
Co-authored-by: Robert Pająk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants