---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/metrics](../index.md) / MetricsTagContext

# Interface: MetricsTagContext

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:71](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L71)

The request identity and applied filters used to derive authoritative tags.

`realm`/`environment` are parsed from `tenantId`. The optional filter fields
mirror the Metrics API's category filters; when a filter was sent, that
dimension is *known from the request* and is stamped onto every series as an
authoritative tag — rather than being (mis)parsed from a drilled-down series
id. For example, requesting `apiFamily=shopper` makes the server return
finer-grained ids like `bdpx.shopper.auth.v1`; folding the filter in yields the
correct `apiFamily: "shopper"` instead of the string-parser's wrong
`apiFamily: "shopper.auth.v1"`.

## Properties

### apiFamily?

> `optional` **apiFamily**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:75](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L75)

The `apiFamily` filter sent with a scapi request, if any.

***

### apiName?

> `optional` **apiName**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:77](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L77)

The `apiName` filter sent with a scapi request, if any.

***

### ocapiApi?

> `optional` **ocapiApi**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:81](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L81)

The `ocapiApi` filter sent with an ocapi request, if any.

***

### ocapiCategory?

> `optional` **ocapiCategory**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:79](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L79)

The `ocapiCategory` filter sent with an ocapi request, if any.

***

### tenantId

> **tenantId**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:73](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L73)

Tenant or organization id the request targeted (with or without `f_ecom_`).

***

### thirdPartyServiceId?

> `optional` **thirdPartyServiceId**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/tags.ts:83](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/tags.ts#L83)

The `thirdPartyServiceId` filter sent with a third-party request, if any.
