Skip to content

APIGOV-33237 - value none or unknown instead of dropping metric fields that are blank or nil #1062

Open
sbolosan wants to merge 5 commits into
mainfrom
APIGOV-33237
Open

APIGOV-33237 - value none or unknown instead of dropping metric fields that are blank or nil #1062
sbolosan wants to merge 5 commits into
mainfrom
APIGOV-33237

Conversation

@sbolosan

Copy link
Copy Markdown
Collaborator
  • Several fields in the metric event (subscription, application, product, marketplace, quota, etc.) used to just disappear from the JSON entirely whenever the agent couldn't fully identify which app, subscription, or product a transaction belonged to, instead of showing up with a clear "we don't know" value.

  • Now, those fields always show up in the event, populated with either the real value when it's known, or a standard placeholder when it isn't. Now downstream systems can always count on the field being there.

  • Also fixed a bug where, if the agent found the app/subscriber but not the specific access grant tied to that API call, it was throwing away the app info it did have and blanking out everything — now it keeps whatever it successfully found.

  • Separately, fixed the API name/ID field so it correctly says "this is a name" vs. "this is a real ID" instead of always claiming it had a real ID even when it was really just guessing based on the name.


Directly backed by the AHurst confluence spec text for metrics:

  • application.id, subscription.id, product.id/versionId, api.apiServiceId, apiServiceRevision.id, assetResource.id, productPlan.id, units..quota.id — all documented as | "unknown" only, no "none" option.

  • application.consumerOrgId and marketplace.consumerOrgId — documented as | "none" only, with the spec's own text: "'none' indicates that it is not a marketplace context event and a consumer org does not apply."

  • marketplace.guid — documented as | "none" | "unknown", with explicit text: "'none' indicates that the event is outside the context of a marketplace... 'unknown' indicates the marketplace could not be determined. Should be avoided unless the information is not available at all."

  • product.owner.type — documented as conditionally required: "When data.product.id is not 'unknown'".

  • application.owner.type / api.owner.type — documented as "team"|"user"|"none"|"unknown" (application) and "team"|"none"|"unknown" (api), with the spec noting "'unknown' is only valid for upgraded events and means the owner could not be determined."

vivekschauhan
vivekschauhan previously approved these changes Jul 17, 2026
dgghinea
dgghinea previously approved these changes Jul 17, 2026
alrosca
alrosca previously approved these changes Jul 17, 2026
jcollins-axway
jcollins-axway previously approved these changes Jul 17, 2026
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.

5 participants