You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(telemetrygen): support integer attributes in telemetrygen tool (… (#38410)
…#38392)
**Description**
Introduced support for integer attributes in the `telemetrygen` tool.
Previously, the tool required all telemetry attribute values to be
strings wrapped in double quotes, which limited the ability to generate
realistic test data with integer values. This change extends the
existing attribute handling to correctly process integer values. The
`--telemetry-attributes` flag now supports both quoted string values and
unquoted integer values.
**Link to tracking issue**
Fixes
[[#38392](#38392)]
**Documentation**
Updated documentation for the `--telemetry-attributes` flag to reflect
the new support for integer attributes and provide examples of both
string and integer usage.
---------
Co-authored-by: Andrzej Stencel <[email protected]>
`Flag may be repeated to set multiple headers (e.g --otlp-header key1=\"value1\" --otlp-header key2=\"value2\")`)
171
179
172
180
// custom resource attributes
173
-
fs.Var(&c.ResourceAttributes, "otlp-attributes", "Custom resource attributes to use. The value is expected in the format key=\"value\". "+
174
-
"You can use key=true or key=false. to set boolean attribute."+
181
+
fs.Var(&c.ResourceAttributes, "otlp-attributes", "Custom telemetry attributes to use. The value is expected in one of the following formats: key=\"value\", key=true, key=false, or key=<integer>. "+
175
182
"Note you may need to escape the quotes when using the tool from a cli. "+
176
-
`Flag may be repeated to set multiple attributes (e.g --otlp-attributes key1=\"value1\" --otlp-attributes key2=\"value2\" --telemetry-attributes key3=true)`)
183
+
`Flag may be repeated to set multiple attributes (e.g --otlp-attributes key1=\"value1\" --otlp-attributes key2=\"value2\" --telemetry-attributes key3=true --telemetry-attributes key4=123)`)
177
184
178
-
fs.Var(&c.TelemetryAttributes, "telemetry-attributes", "Custom telemetry attributes to use. The value is expected in the format key=\"value\". "+
179
-
"You can use key=true or key=false. to set boolean attribute."+
185
+
fs.Var(&c.TelemetryAttributes, "telemetry-attributes", "Custom telemetry attributes to use. The value is expected in one of the following formats: key=\"value\", key=true, key=false, or key=<integer>. "+
180
186
"Note you may need to escape the quotes when using the tool from a cli. "+
181
-
`Flag may be repeated to set multiple attributes (e.g --telemetry-attributes key1=\"value1\" --telemetry-attributes key2=\"value2\" --telemetry-attributes key3=true)`)
187
+
`Flag may be repeated to set multiple attributes (e.g --telemetry-attributes key1=\"value1\" --telemetry-attributes key2=\"value2\" --telemetry-attributes key3=true --telemetry-attributes key4=123)`)
182
188
183
189
// TLS CA configuration
184
190
fs.StringVar(&c.CaFile, "ca-cert", c.CaFile, "Trusted Certificate Authority to verify server certificate")
0 commit comments