Splunk AppDynamics

Lamda Expression in .NET Getter Chain

Harrison_Clark
Explorer

Is it possible to use a lamda expression in a .NET getter chain for a data collector? I have a List of objects that I would like to call Find on and pass a lamda to get the one I need.

Basically I want to call this:

Actions.Find(x => x.ActionType == ActionType.Settle).ResultMessage

But I'm not sure what the syntax for the getter chain should be in this case (or if it's even possible). Any ideas?

Labels (1)

Yusuke_Miyahara
Explorer

Hello Harrison,

Thank you for reaching out to the community.

We do not support for Linq query with lambda expression in data collector/information point getter chain.

Apologies for the inconvenience. The workaround is to add the getter method that returns the evaluated value,
and add data collector to this method. Please consult the following steps and the reference. (For example, it is assumed that getActionType and getResultMessage are implemented.)

Steps:
1. Go Configuration > Instrumentation in your SaaS controller web page.
2. Click the Data Collector tab and click the Add button below the Method Invocation Data Collectors panel.
3. Input the following fields and click the save button.

  <Example>
    Name: MyDataCollector
    Class: with a class name that equals MyApplication.mynamespace.myclass
    Method Name: Mymethod
    Match Conditions:
        Collect Data From : Method Parameter @index:0
        Operation on Method Parameter: Use Getter Chain: getActionType()
        Equals: Settle

 4. Click the Add button below the Specify the Data to Collect from this Method Invocation panel.
 5. Input the following fields and click the save button.

  <Example>
    Display Name: MyDataCollector
    Collect Data From : Method Parameter @index:0
    Operation on Method Parameter: Use Getter Chain: getResultMessage()

6. Click the save button.
7. You must wait one minute and restart the CLR for the changes to take effect.

Reference: https://docs.appdynamics.com/display/PRO45/Data+Collectors

Best regards,
Yusuke

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...