feat(telemetryrouter): Onboarding TelemetryRouter#1425
Conversation
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
…ackit into feature/telemetryrouter
| "description": "The description of the TelemetryRouter instance", | ||
| "filter": "The TelemetryRouter global filter settings", | ||
| "filter.attributes": "The TelemetryRouter global filter attributes", | ||
| "filter.attributes.key": "The TelemetryRouter global filter attribute key", |
There was a problem hiding this comment.
nitpick: we generally use _ instead of .
There was a problem hiding this comment.
I actually saw . being used to distinguish between a name like "instance_id" and layers like "query_parameters.name" in other resource descriptions.
| }, nil | ||
| } | ||
|
|
||
| func mapCreateFields(_ context.Context, accessToken *telemetryrouter.CreateAccessTokenResponse, model *Model) error { |
There was a problem hiding this comment.
I think we should combine the three map functions into one mapFields.
| return nil | ||
| } | ||
|
|
||
| func mapUpdateFields(_ context.Context, accessToken *telemetryrouter.UpdateAccessTokenResponse, model *Model) error { |
There was a problem hiding this comment.
There is no unit test for this function.
But as I mentioned, if possible, we should have one mapFields function instead of 3.
| }, nil | ||
| } | ||
|
|
||
| func mapCreateFields(_ context.Context, accessToken *telemetryrouter.CreateAccessTokenResponse, model *Model) error { |
There was a problem hiding this comment.
same here like the comment in update. No unit test
| "config_filter_matcher": config.StringVariable("="), | ||
| "config_filter_value0": config.StringVariable("value1"), | ||
| "config_filter_value1": config.StringVariable("value2"), | ||
| "config_opentelemetry_bearer_token": config.StringVariable("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30"), |
There was a problem hiding this comment.
You should not use hard coded token like that. This wont work.
Co-authored-by: Gökce Gök Klingel <161626272+GokceGK@users.noreply.github.com>
Co-authored-by: Gökce Gök Klingel <161626272+GokceGK@users.noreply.github.com>
Description
Telemetry Router resources and datasource
Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)