Splunk AppDynamics

data collector on node.js

oadiaobong
Explorer

I am unable to create a data collector on my node.js application. I came across this doc " For the Node.js agent, you can create a method data collector only using the addSnapshotData() Node.js API, not the Controller UI as described here. See Node.js Agent API Reference". 

I have 2 questions;

  • how do I determine the value and key to use
  • where do I add addSnapshotData()
Labels (1)
0 Karma

iamryan
Community Manager
Community Manager

Hi @Adiaobong.Odungide,

Sorry for the late reply, this is what I heard back from the Docs team.

The `key` is whatever you want to use to identify the custom data; the `value` is the data you want to capture and attach to the snapshot. The call to `txn.addSnapshotData()` can occur anywhere in your application where a transaction is in progress, either programmatically created via `appd.startTransaction(...)` or auto-discovered and retrieved via `appd.getTransaction(request)`. To add custom snapshot data to a transaction that's already being detected and reported, `getTransaction()` would be the required approach.

0 Karma

iamryan
Community Manager
Community Manager

Hi @Adiaobong.Odungide,

I've reached out to the Docs team looking for some clarification. I will report back when I have more info.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...