Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
75b17b2
Add stored procedure columns to events (#1)
cjksplunk Jan 16, 2026
e246972
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 16, 2026
90bdba3
Merge branch 'main' into main
cjksplunk Jan 16, 2026
7abc62e
Merge branch 'upstream-main'
cjksplunk Jan 19, 2026
c1c2e26
Merge remote-tracking branch 'origin/main'
cjksplunk Jan 19, 2026
fa09c77
Add stored procedure columns to events (#3)
cjksplunk Jan 21, 2026
fc719a0
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 21, 2026
e6d4cb2
Add stored procedure columns to events (#4)
cjksplunk Jan 21, 2026
349bdd9
Merge branch 'main' into main
cjksplunk Jan 22, 2026
de27981
Add stored procedure columns to events (#5)
cjksplunk Jan 22, 2026
7b99d52
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 22, 2026
a796b03
Add stored procedure columns to events (#6)
cjksplunk Jan 22, 2026
bd45f8d
Add stored procedure columns to events (#7)
cjksplunk Jan 22, 2026
06e7794
Add stored procedure columns to events (#8)
cjksplunk Jan 22, 2026
4b49fe6
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 22, 2026
27fa7ee
Merge branch 'main' into main
cjksplunk Jan 22, 2026
260e4aa
Add stored procedure columns to events (#9)
cjksplunk Jan 23, 2026
03932c1
Merge branch 'main' into main
cjksplunk Jan 23, 2026
ce565af
Merge branch 'main' into main
cjksplunk Jan 23, 2026
890fce5
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 27, 2026
c7bd77a
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 27, 2026
8ff3bf0
Add stored procedure columns to events (#10)
cjksplunk Jan 27, 2026
bc85d87
Add stored procedure columns to events (#11)
cjksplunk Jan 27, 2026
4ff560c
Merge branch 'main' into main
cjksplunk Jan 28, 2026
c7b813f
Merge branch 'open-telemetry:main' into main
cjksplunk Jan 29, 2026
f5786f3
Apply suggestion from @crobert-1
cjksplunk Jan 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .chloggen/add-stored-procedure-columns-to-events.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: receiver/sqlserver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: adding sqlserver.procedure_id and sqlserver.procedure_name attributes to TopQuery and Sample Events

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [44656]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: Refined query and reported events to include stored procedure information when applicable.
Additionally, the maximum number of active queries reported by default has been increased from 200 to 250 to account for record deaggregation introduced by this change, ensuring the effective limit remains consistent with the previous 200-query baseline.

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
4 changes: 2 additions & 2 deletions receiver/sqlserverreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ sqlserver:
top_query_collection: # this collection exports the most expensive queries as logs
lookback_time: 60s # which time window should we look for the top queries
max_query_sample_count: 1000 # maximum number query we store in cache for top queries.
top_query_count: 200 # The maximum number of active queries to report in a single run.
top_query_count: 250 # The maximum number of active queries to report in a single run.
collection_interval: 60s # collection interval for top query collection specifically
query_sample_collection: # this collection exports the currently (relate to the query time) executing queries as logs
max_rows_per_query: 100 # the maximum number of samples to return for one single query.
Expand Down Expand Up @@ -90,7 +90,7 @@ Top-Query collection specific options (only useful when top-query collection are
- `lookback_time` (optional, example = `60s`, default = `2 * collection_interval`): The time window (in second) in which to query for top queries.
- Queries that were finished execution outside the lookback window are not included in the collection. Increasing the lookback window (in seconds) will be useful for capturing long-running queries.
- `max_query_sample_count` (optional, example = `5000`, default = `1000`): The maximum number of records to fetch in a single run.
- `top_query_count`: (optional, example = `100`, default = `200`): The maximum number of active queries to report (to the next consumer) in a single run.
- `top_query_count`: (optional, example = `100`, default = `250`): The maximum number of active queries to report (to the next consumer) in a single run.
- `collection_interval`: (optional, default = `60s`): The interval at which top queries should be emitted by this receiver.
- This value can only guarantee that the top queries are collected at most once in this interval.
- For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `60s`.
Expand Down
4 changes: 4 additions & 0 deletions receiver/sqlserverreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ query sample
| sqlserver.wait_type | Type of wait encountered by the request. Empty if none. | Any Str |
| sqlserver.writes | Number of writes performed by the query. | Any Int |
| user.name | Login name associated with the SQL Server session. | Any Str |
| sqlserver.procedure_id | The SQLServer ID of the stored procedure, if any | Any Str |
| sqlserver.procedure_name | The name of the stored procedure, if any | Any Str |

### db.server.top_query

Expand All @@ -630,6 +632,8 @@ top query
| server.address | The network address of the server hosting the database. | Any Str |
| server.port | The port number on which the server is listening. | Any Int |
| db.system.name | The database management system (DBMS) product as identified by the client instrumentation. | Any Str |
| sqlserver.procedure_id | The SQLServer ID of the stored procedure, if any | Any Str |
| sqlserver.procedure_name | The name of the stored procedure, if any | Any Str |

## Resource Attributes

Expand Down
2 changes: 1 addition & 1 deletion receiver/sqlserverreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func createDefaultConfig() component.Config {
},
TopQueryCollection: TopQueryCollection{
MaxQuerySampleCount: 1000,
TopQueryCount: 200,
TopQueryCount: 250,
CollectionInterval: time.Minute,
},
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/sqlserverreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestFactory(t *testing.T) {
},
TopQueryCollection: TopQueryCollection{
MaxQuerySampleCount: 1000,
TopQueryCount: 200,
TopQueryCount: 250,
CollectionInterval: time.Minute,
},
QuerySample: QuerySample{
Expand Down
16 changes: 10 additions & 6 deletions receiver/sqlserverreceiver/internal/metadata/generated_logs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading