question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reconsider structure of `context.db.statement`

See original GitHub issue

We utilise the Node JS agent to capture Elasticsearch queries from Kibana. For this we need the full content body which is currently captured in the field context.db.statement. This value, however, contains the request body and URL (with parameters) delimited by two new lines. In order for us to extract the ES body + index name + any parameters, we currently parse this payload client side.

This obviously works it makes our code susceptible to changes in the agent. Whilst fields are governed by ECS and a change control process, are changes in the structure of field values also considered potentially breaking changes? If so, could such changes be made in a minor or could we rely on their consistency across majors? https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-3.x.html#release-notes-3.10.0 suggests that changes can be made in a minor which is concerning.

This is further complicated by the fact we use the agent version distributed with Kibana, so we would need to track the agent version this uses.

One proposal is that these values be stored in separate fields i.e. only the request body be stored in context.db.statement and the params and index names be stored in separate fields. The agent would in effect be responsible for parsing these values. Whilst we would prefer this solution, we appreciate that is a decision beyond a single agent.

@trentm

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
trentmcommented, May 3, 2021

Sounds good to me. I can take this.

0reactions
trentmcommented, Nov 11, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I view the SQL generated by the Entity Framework?
in the Visual Studio output panel: using (MyDatabaseEntities context = new MyDatabaseEntities()) { context. Database. Log = s => System.
Read more >
Working with DbContext - EF6 - Microsoft Learn
By default, the context manages connections to the database. The context opens and closes connections as needed. For example, the context opens ...
Read more >
Chapter 11 Leveraging Database Views | Exploring Enterprise ...
This chapter demonstrates how to: Understand database views and their uses; Unpack a database view to see what it's doing; Reproduce a database...
Read more >
Form Library - Financial Aid - Washington University in St. Louis
Financial Aid Award Reconsideration Request Form for Prospective Students ... Proof of Identity and Statement of Educational Purpose ...
Read more >
Reconsidering anion inhibitors in the general context of drug ...
Matulis suggested that the observed experimental inhibition constants should not be directly translated into a structure − activity ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found