chitin-openclaw-plugin 0.3.3 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -157,8 +157,17 @@ var plugin = {
157
157
  if (k) headerObj[k.trim()] = v.join("=").trim();
158
158
  }
159
159
  }
160
+ const agentName = process.env.AGENT_NAME || "unknown";
161
+ const agentId = process.env.AGENT_ID || "unknown";
162
+ const pluginResource = resourceFromAttributes({
163
+ [ATTR_SERVICE_NAME]: "chitin-plugin",
164
+ "service.namespace": process.env.HOSTNAME || "unknown",
165
+ "service.instance.id": `${agentName}-${agentId.slice(0, 8)}`,
166
+ "agent.name": agentName,
167
+ "agent.id": agentId
168
+ });
160
169
  const provider = new NodeTracerProvider({
161
- resource: resourceFromAttributes({ [ATTR_SERVICE_NAME]: "chitin-plugin" }),
170
+ resource: pluginResource,
162
171
  spanProcessors: [
163
172
  new BatchSpanProcessor(new OTLPTraceExporter({
164
173
  url: `${endpoint}/v1/traces`,
@@ -170,7 +179,7 @@ var plugin = {
170
179
  new HttpInstrumentation().enable();
171
180
  new UndiciInstrumentation().enable();
172
181
  const logProvider = new LoggerProvider({
173
- resource: resourceFromAttributes({ [ATTR_SERVICE_NAME]: "chitin-plugin" }),
182
+ resource: pluginResource,
174
183
  processors: [
175
184
  new BatchLogRecordProcessor(
176
185
  new OTLPLogExporter({ url: `${endpoint}/v1/logs`, headers: headerObj })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chitin-openclaw-plugin",
3
- "version": "0.3.3",
3
+ "version": "0.4.1",
4
4
  "description": "OpenClaw plugin for Chitin Casino — wallet management and poker game connection",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",