> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LocalMetricConfig

***

# Interface: LocalMetricConfig

Defined in: [src/types/metrics.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/metrics.types.ts)

Configuration for a local metric that is computed client-side.

This interface defines metrics that are evaluated on the client rather than server-side.
Local metrics are useful for custom scoring logic that needs to run in the client environment.

## Properties

### aggregatableTypes?

```ts theme={null}
optional aggregatableTypes: string[];
```

Defined in: [src/types/metrics.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/metrics.types.ts)

The step types that can have aggregated scores.
Must not contain any types in scorableTypes.
Can only contain 'trace' or 'workflow' step types.

#### Default

```ts theme={null}
["trace"];
```

***

### name

```ts theme={null}
name: string;
```

Defined in: [src/types/metrics.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/metrics.types.ts)

The name of the metric

***

### scorableTypes?

```ts theme={null}
optional scorableTypes: string[];
```

Defined in: [src/types/metrics.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/metrics.types.ts)

The step types that can be scored by this metric.

#### Default

```ts theme={null}
["llm"];
```

***

### scorerFn()

```ts theme={null}
scorerFn: (traceOrSpan: Span | Trace) => MetricValueType;
```

Defined in: [src/types/metrics.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/metrics.types.ts)

The scoring function that computes the metric value.
Takes a trace or span and returns a metric value.

#### Parameters

##### traceOrSpan

[`Span`](/sdk-api/typescript/reference/types/type-aliases/Span) | [`Trace`](/sdk-api/typescript/reference/types/classes/Trace)

#### Returns

[`MetricValueType`](/sdk-api/typescript/reference/types/type-aliases/MetricValueType)
