Skip to content

Commit 0bd9126

Browse files
Address Review Comment on Property Naming
Removes `metrics` from Dynatrace token name config. Adds options for resource format. Signed-off-by: Karsten Schnitter <[email protected]>
1 parent 9e63b77 commit 0bd9126

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cf-java-logging-support-opentelemetry-agent-extension/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ There is no custom network client provided by this extension.
128128
129129
The extension itself can be configured by specifying the following system properties:
130130

131-
| Property | Default Value | Comment |
132-
|-----------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
133-
| `sap.cloud-logging.cf.binding.label.value` | `cloud-logging` | The label of the managed service binding to bind to. |
134-
| `sap.cloud-logging.cf.binding.tag.value` | `Cloud Logging` | The tag of any service binding (managed or user-provided) to bind to. |
135-
| `sap.dynatrace.cf.binding.label.value` | `dynatrace` | The label of the managed service binding to bind to. |
136-
| `sap.dynatrace.cf.binding.tag.value` | `dynatrace` | The tag of any service binding (managed or user-provided) to bind to. |
137-
| `sap.dynatrace.cf.binding.metrics.token.name` | | The name of the field containing the Dynatrace API token within the service binding credentials. This is required to send metrics to Dynatrace. |
138-
| `sap.cloudfoundry.otel.resources.enabled` | `true` | Whether to add CF resource attributes to all events. |
139-
| `sap.cloudfoundry.otel.resources.format` | `SAP` | The semantic convention to follow for the CF resource attributes. |
131+
| Property | Default Value | Comment |
132+
|--------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
133+
| `sap.cloud-logging.cf.binding.label.value` | `cloud-logging` | The label of the managed service binding to bind to. |
134+
| `sap.cloud-logging.cf.binding.tag.value` | `Cloud Logging` | The tag of any service binding (managed or user-provided) to bind to. |
135+
| `sap.dynatrace.cf.binding.label.value` | `dynatrace` | The label of the managed service binding to bind to. |
136+
| `sap.dynatrace.cf.binding.tag.value` | `dynatrace` | The tag of any service binding (managed or user-provided) to bind to. |
137+
| `sap.dynatrace.cf.binding.token.name` | | The name of the field containing the Dynatrace API token within the service binding credentials. This is required to send metrics to Dynatrace. |
138+
| `sap.cloudfoundry.otel.resources.enabled` | `true` | Whether to add CF resource attributes to all events. |
139+
| `sap.cloudfoundry.otel.resources.format` | `SAP` | The semantic convention to follow for the CF resource attributes. Supported values are `SAP` and `OTEL`. |
140140

141141
> Each property can also be provided as environment variable, e.g., `sap.cloud-logging.cf.binding.label.value` as
142142
`SAP.CLOUD-LOGGING.CF.BINDING.LABEL.VALUE`.
@@ -222,7 +222,7 @@ The following table summarizes all configuration properties provided by the exte
222222
| `sap.cloud-logging.cf.binding.tag.value` | The tag value used to identify managed Cloud Logging service bindings. | `Cloud Logging` |
223223
| `sap.dynatrace.cf.binding.label.value` | The label value used to identify managed Dynatrace service bindings. | `dynatrace` |
224224
| `sap.dynatrace.cf.binding.tag.value` | The tag value used to identify managed Dynatrace service bindings. | `dynatrace` |
225-
| `sap.dynatrace.cf.binding.metrics.token.name` | The name of the field containing the Dynatrace API token within the service binding credentials. | |
225+
| `sap.dynatrace.cf.binding.token.name` | The name of the field containing the Dynatrace API token within the service binding credentials. | |
226226

227227
## Using User-Provided Service Instances
228228

@@ -284,12 +284,12 @@ Do not forget to configure the name chosen for `<your_token_field>` via the resp
284284

285285
```sh
286286
java #... \
287-
-Dsap.dynatrace.cf.binding.metrics.token.name=<your_token_field> \
287+
-Dsap.dynatrace.cf.binding.token.name=<your_token_field> \
288288
# ...
289289

290290
# or
291291

292-
SAP_DYNATRACE_CF_BINDING_METRICS_TOKEN_NAME=<your_token_field>
292+
SAP_DYNATRACE_CF_BINDING_TOKEN_NAME=<your_token_field>
293293
java #...
294294
```
295295

cf-java-logging-support-opentelemetry-agent-extension/src/main/java/com/sap/hcf/cf/logging/opentelemetry/agent/ext/config/ExtensionConfigurations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ interface DYNATRACE {
253253
.build();
254254

255255
ConfigProperty<String> TOKEN_NAME =
256-
stringValued("sap.dynatrace.cf.binding.metrics.token.name").withFallback(
256+
stringValued("sap.dynatrace.cf.binding.token.name").withFallback(
257257
DEPRECATED.RUNTIME.CLOUD_FOUNDRY.SERVICE.DYNATRACE.TOKEN_NAME_OTEL).build();
258258
}
259259

cf-java-logging-support-opentelemetry-agent-extension/src/test/java/com/sap/hcf/cf/logging/opentelemetry/agent/ext/config/ExtensionConfigurationsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static Stream<Arguments> provideStringProperties() {
6969
of(ExtensionConfigurations.RUNTIME.CLOUD_FOUNDRY.SERVICE.DYNATRACE.TAG,
7070
"otel.javaagent.extension.sap.cf.binding.dynatrace.tag", "dt"),
7171
of(ExtensionConfigurations.RUNTIME.CLOUD_FOUNDRY.SERVICE.DYNATRACE.TOKEN_NAME,
72-
"sap.dynatrace.cf.binding.metrics.token.name", "api-token"),
72+
"sap.dynatrace.cf.binding.token.name", "api-token"),
7373
of(ExtensionConfigurations.RUNTIME.CLOUD_FOUNDRY.SERVICE.DYNATRACE.TOKEN_NAME,
7474
"otel.javaagent.extension.sap.cf.binding.dynatrace.metrics.token-name", "api-token"));
7575
}

0 commit comments

Comments
 (0)