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

chore: update KSQL metrics context labels #5757

Merged
merged 4 commits into from
Jul 15, 2020

Conversation

stevenpyzhang
Copy link
Member

@stevenpyzhang stevenpyzhang commented Jul 1, 2020

Description

  • lower case the resource type
  • adds the following configs to ksqlConfig when initializing KSQL for either headless or interactive mode so that all components get the same base set of labels
metrics.context.resource.kafka.cluster.id
metrics.context.resource.type
metrics.context.resource.cluster.id
metrics.context.resource.version
metrics.context.resource.commit.id

Testing done

Rechecking labels present in the staging URL for Druid

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

updatedProps.put(RESOURCE_LABEL_KSQL_SERVICE_ID, ksqlServiceId);
updatedProps.put(RESOURCE_LABEL_KAFKA_CLUSTER_ID, kafkaClusterId);
Copy link
Member

Choose a reason for hiding this comment

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

if ksql.cluster.id and ksql.service.id are the same, why do we need both?

Copy link
Member Author

Choose a reason for hiding this comment

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

we can remove RESOURCE_LABEL_KSQL_SERVICE_ID and just keep the cluster id label. The service id of a KSQL server is the only id for it so it essentially is the cluster id

Copy link
Member

Choose a reason for hiding this comment

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

RESOURCE_LABEL_CLUSTER_ID and RESOURCE_LABEL_KAFKA_CLUSTER_ID are the same. I would recommend to keep RESOURCE_LABEL_KSQL_SERVICE_ID which is more meaningful for KSQL.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I see, I was under the impression that the cluster id meant the ksql cluster id, not the kafka one. If that's the case, then I'll keep RESOURCE_LABEL_KSQL_SERVICE_ID

Copy link
Member

Choose a reason for hiding this comment

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

@stevenpyzhang @xiaodongdu I think it makes more sense to keep ksql.cluster.id as the KSQL service ID, and ksql.kafka.cluster.id as the backing cluster id to align with the terminology we already use in RBAC https://docs.confluent.io/current/security/rbac/rbac-get-cluster-ids.html#ksqldb-example

We should fix the other components if they don't align.

Copy link
Member Author

Choose a reason for hiding this comment

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

@xvrl I've updated the PR to match with this ^

@xiaodongdu
Copy link
Member

Fix looks fine, one thing I'm not clear, metrics.context.resource.cluster.id and metrics.context.resource.service.id are both populated with service id, why do we need both?

@stevenpyzhang stevenpyzhang merged commit 6edd20b into confluentinc:6.0.x Jul 15, 2020
stevenpyzhang added a commit that referenced this pull request Jul 15, 2020
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.

3 participants