# App-specific Telemetry around C# Scroll API usage

**URL:** <https://discuss.elastic.co/t/app-specific-telemetry-around-c-scroll-api-usage/150076>\
**Category:** Elasticsearch\
**Created:** [September 26, 2018, 7:35pm UTC](https://discuss.elastic.co/t/app-specific-telemetry-around-c-scroll-api-usage/150076 "2018-09-26T19:35:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrianH](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@BrianH](https://discuss.elastic.co/u/BrianH)\
**Post date:** [September 26, 2018, 7:35pm UTC](https://discuss.elastic.co/t/app-specific-telemetry-around-c-scroll-api-usage/150076/1 "2018-09-26T19:35:56Z")

</div>

**Overall goal** : tag search requests with application-specific correlation data (e.g. event context) so that packetbeat can parse and index es activity by these correlation data.

Our application is written in C#, and we're using the LowLevel client, and we noticed that the SearchRequestParameters object has a "Stats()" call that allows you to add application-specific data to the request. See: [https://github.com/elastic/elasticsearch-net/blob/bc48aa07a489923fa213dc22aec0ff625551b70d/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs#L1905](https://github.com/elastic/elasticsearch-net/blob/bc48aa07a489923fa213dc22aec0ff625551b70d/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs#L1905)

We are looking to do this with the ScrollAsync call, which uses a ScrollRequestParameters, but I am unable to find a Stats() entry. The below does not compile.

```
client.LowLevel.ScrollAsync<DynamicResponse>(<body>, p => p.Stats("foobar"));

```

I have confirmed that a "curl" to scroll \_search/scroll/?stats=foobarbaz... does indeed work.

As a reminder, the **overall goal** is just to get data into the request so that packet beat can get it. Perhaps we could do this if we could get access to the header (just add some header data and have packet beat parse that), but I could not see a way to get access to the header using the LowLevel client.

Any help to accomplish the **overall goal** of tagging searches and scrolls (including every subsequent scroll request) would be helpful.

Thanks,  
Brian

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 24, 2018, 7:36pm UTC](https://discuss.elastic.co/t/app-specific-telemetry-around-c-scroll-api-usage/150076/2 "2018-10-24T19:36:01Z")

</div>

Closed on October 24, 2018, 7:36pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
