monica-opentelemetry
Monica OpenTelemetry and metrics development guidance.
Skill by Tairitsua
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tairitsua-monica-opentelemetry
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/monica-opentelemetry
What's inside
- Skill name
monica-opentelemetry- Description
- Monica OpenTelemetry and metrics development guidance. Use when adding or refactoring Monica module telemetry, creating a Metrics/ folder, designing System.Diagnostics.Metrics instruments with IMeterFactory, exposing OpenTelemetry-compatible meter names, choosing Counter/Histogram/Gauge instruments, handling app-owned diagnostic snapshots, avoiding high-cardinality tags, or deciding where metrics instrumentation belongs in Monica modules.
- License
- MIT
- Instructions
- 166 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# Monica OpenTelemetry
Use this skill to author Monica module instruments. For an application registering exporters or consuming existing diagnostics, use `$monica-infra-observability`.
## Core Rule
Monica modules emit standard .NET metrics through `System.Diagnostics.Metrics`. Hosts configure OpenTelemetry exporters, Prometheus scraping, OTLP, Azure Monitor, storage, and dashboards.
```text
Monica module -> System.Diagnostics.Metrics -> host OpenTelemetry setup -> backend/UI
```
Do not add `OpenTelemetry.*` package references to Monica infrastructure modules unless the module is explicitly an observability host/integration module.
## Folder Placement
Use `Metrics/` for telemetry names, instruments, app-owned metric state, and instrumentation adapters.
```text
Monica.{Name}/
├── Metrics/
│ ├── {Name}MetricNames.cs # public constants when hosts need meter names
│ ├── {Feature}Metrics.cs # internal singleton metric owner
│ └── {Feature}MetricsInterceptor.cs # optional adapter, e.g. EF Core interceptor
```
For feature-folder modules, place telemetry under the feature:
```text
Monica.Repository/
└── Persistence/
└── Metrics/
```
Snapshot DTOs exposed to Facades or UI stay in `Models/`, not `Metrics/`.
## Standard Pattern
Create one internal singleton metric owner per coherent telemetry area. Use `IMeterFactory`, not static `new Meter(...)`, in DI-based Monica modules.
```csharp
using System.Diagnostics.Metrics;
namespace Monica.Repository.Persistence.Metrics;
public static class RepositoryPersistenceMetricNames
{
public const string MeterName = "Monica.Repository.Persistence";
public const string EfCoreConnectionEvents =
"monica.repository.persistence.ef_core.connection.events";
}
internal sealed class EfCoreConnectionMetrics(IMeterFactory meterFactory)
{
private const string EVENT_TAG_NAME = "event";
private readonly Counter<long> _connectionEvents = meterFactory
.Create(RepositoryPersistenceMetricNames.MeterName)
.CreateCounter<long>(
RepositoryPersistenceMetricNames.EfCoreConnectionEvents,
unit: "events",
description: "EF Core connection lifecycle events observed by Monica Repository.");
public void RecordConnectionOpened()
{
_connectionEvents.Add(1, new KeyValuePair<string, object?>(EVENT_TAG_NAME, "opened"));
}
}
```
Register metric owners as singleton:
```csharp
services.TryAddSingleton<EfCoreConnectionMetrics>();
services.TryAddSingleton<EfCoreConnectionMetricsInterceptor>();
```
## Host Bootstrap
`IMeterFactory` is auto-registered by `Microsoft.Extensions.Hosting` in .NET 8+ and by ASP.NET Core hosts. Monica modules just register their metric owners with `TryAddSingleton<TMetrics>()`. Call `services.AddMetrics()` only in non-Hosting scenarios such as bare `ServiceCollection` test fixtures.
Expose a module option when instrumentation has non-trivial overhead or attaches framework adapters:
```csharp
public bool EnableEfCoreConnectionMetrics { get; set; }
```
## Instrument Choice
- Use `Counter<T>` for monotonic totals such as requests, failures, lifecycle events, bytes sent, or jobs completed.
- Use `Histogram<T>` for distributions such as duration, payload size, queue latency, or retry delay.
- Use `ObservableGauge<T>` for current values read from app-owned state, such as active jobs, pending sends, or open connections.
- Use app-owned state only when Monica needs a current snapshot, UI data, or observable gauge values. Do not mirror counters just to read metric values later.
## Tags
Keep tags low-cardinality and stable.
Good tags:
```text
event=opened
result=success
reason=validation
state=pending
provider=postgresql
```
Avoid tags with unbounded or sensitive values:
```text
user.id
order.id
trace.id
connection.id
exception.message
raw path/query strings
```From Tairitsua/Monica, MIT.
More from Tairitsua/Monica
- 0.639score
monica-application-unit-testing
Tairitsua
Apply Monica application testing rules when creating, refactoring, or reviewing behavior tests, host scenarios, persistence isolation, and provider seams.
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-guide
Tairitsua
Explain, bootstrap, configure, diagnose, update, and route the Monica toolbox, including application specification loading, extension/framework work, skill…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-infra-ui
Tairitsua
Register and use Monica Blazor UI modules, the shell, icons, Markdown viewer, themes, navigation, and localization in a host.
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-application-project-unit-development
Tairitsua
Apply Monica application unit rules when implementing, refactoring, or reviewing handlers, entities, repositories, events, jobs, seeders, host services, CRUD…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-unit-testing
Tairitsua
Create, migrate, or review Monica framework tests and shared testing infrastructure, including host-owned scenarios, raw ProjectUnit fixtures, Roslyn…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-application
Tairitsua
Apply the shared Monica application specification and the repository's project specification before designing, implementing, refactoring, or reviewing a…
SkillAFreshness: A★ 14Claude Code +9 - 0.637score
monica-infra-jobs
Tairitsua
Use when adding Monica JobScheduler recurring or triggered jobs, choosing its store and scope, or configuring startup seeders and their readiness behavior.
SkillAFreshness: A★ 14Claude Code +9 - 0.637score
monica-infra-persistence
Tairitsua
Use when integrating Monica Repository, UnitOfWork, transactional domain events, outbox, or inbox in an application, diagnosing save and commit behavior, or…
SkillAFreshness: A★ 14Claude Code +9 - 0.637score
monica-infra-configuration
Tairitsua
Use when integrating Monica managed configuration, bootstrap input plans, file or EF Core stores, pure object validation, observed options diagnostics…
SkillAFreshness: A★ 14Claude Code +9 - 0.637score
monica-infra-messaging
Tairitsua
Use when integrating Monica EventBus, RPC clients, DataChannel pipelines, or SignalR hubs and diagnosing their transport, delivery, and provider configuration.
SkillAFreshness: A★ 14Claude Code +9 - 0.637score
monica-infra-ai
Tairitsua
Configure and use Monica AI providers, chat, knowledge bases, RAG, runtime skills, and MCP in an application.
SkillAFreshness: A★ 14Claude Code +9 - 0.635score
monica-ui-development
Tairitsua
Implement Monica Blazor and MudBlazor v9 components, pages, themes, CSS isolation, local assets, browser storage, and async component lifecycle.
SkillAFreshness: A★ 14Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 14
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Tairitsua/Monica
- Website
- monica.dpdns.org/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Tairitsua
- 0.639score
monica-guide
Tairitsua
Explain, bootstrap, configure, diagnose, update, and route the Monica toolbox, including application specification loading, extension/framework work, skill…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-application
Tairitsua
Apply the shared Monica application specification and the repository's project specification before designing, implementing, refactoring, or reviewing a…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-unit-testing
Tairitsua
Create, migrate, or review Monica framework tests and shared testing infrastructure, including host-owned scenarios, raw ProjectUnit fixtures, Roslyn…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-application-unit-testing
Tairitsua
Apply Monica application testing rules when creating, refactoring, or reviewing behavior tests, host scenarios, persistence isolation, and provider seams.
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-application-project-unit-development
Tairitsua
Apply Monica application unit rules when implementing, refactoring, or reviewing handlers, entities, repositories, events, jobs, seeders, host services, CRUD…
SkillAFreshness: A★ 14Claude Code +9 - 0.639score
monica-infra-ui
Tairitsua
Register and use Monica Blazor UI modules, the shell, icons, Markdown viewer, themes, navigation, and localization in a host.
SkillAFreshness: A★ 14Claude Code +9
Cite this page
monica-opentelemetry skill. Agent Mart. https://agentmart.dev/skills/tairitsua-monica-opentelemetry (last updated 2026-10-24)