MCPcopy Index your code
hub / github.com/simstudioai/sim / recordCostCharged

Function recordCostCharged

apps/sim/lib/monitoring/metrics.ts:158–165  ·  view source on GitHub ↗
(costUsd: number, labels: { provider: string; tool: string })

Source from the content-addressed store, hash-verified

156 })
157 },
158 recordCostCharged(costUsd: number, labels: { provider: string; tool: string }) {
159 // Unit None: CloudWatch has no USD unit; value is dollars.
160 if (costUsd > 0)
161 enqueue('CostCharged', costUsd, StandardUnit.None, {
162 Provider: labels.provider,
163 Tool: labels.tool,
164 })
165 },
166 recordThrottled(labels: { provider: string; tool: string; reason: ThrottleReason }) {
167 enqueue('Throttled', 1, StandardUnit.Count, {
168 Provider: labels.provider,

Callers

nothing calls this directly

Calls 1

enqueueFunction · 0.70

Tested by

no test coverage detected