Skip to content

Commit 425797d

Browse files
committed
Removing 'Query sample' implementaion. Will be raising separate PR
1 parent 1f145fc commit 425797d

File tree

13 files changed

+6
-608
lines changed

13 files changed

+6
-608
lines changed

receiver/oracledbreceiver/config.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ type TopQueryCollection struct {
3535
QueryCacheSize int `mapstructure:"query_cache_size"`
3636
}
3737

38-
type QuerySample struct {
39-
MaxRowsPerQuery uint64 `mapstructure:"max_rows_per_query"`
40-
41-
// prevent unkeyed literal initialization
42-
_ struct{}
43-
}
44-
4538
type Config struct {
4639
DataSource string `mapstructure:"datasource"`
4740
Endpoint string `mapstructure:"endpoint"`
@@ -53,7 +46,6 @@ type Config struct {
5346
metadata.LogsBuilderConfig `mapstructure:",squash"`
5447

5548
TopQueryCollection `mapstructure:"top_query_collection"`
56-
QuerySample `mapstructure:"query_sample_collection"`
5749
}
5850

5951
func (c Config) Validate() error {

receiver/oracledbreceiver/documentation.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -389,40 +389,6 @@ events:
389389
enabled: true
390390
```
391391
392-
### db.server.query_sample
393-
394-
sample query
395-
396-
#### Attributes
397-
398-
| Name | Description | Values |
399-
| ---- | ----------- | ------ |
400-
| db.query.text | The text of the database query being executed. | Any Str |
401-
| db.system.name | The database management system (DBMS) product as identified by the client instrumentation. | Any Str |
402-
| user.name | Database user name under which a session is connected to | Any Str |
403-
| db.namespace | The database name. | Any Str |
404-
| client.address | Hostname or address of the client. | Any Str |
405-
| client.port | TCP port used by the client. | Any Int |
406-
| network.peer.address | IP address of the peer client. | Any Str |
407-
| network.peer.port | TCP port used by the peer client. | Any Int |
408-
| oracledb.plan_hash_value | Binary hash value calculated on the query execution plan and used to identify similar query execution plans, reported in the HEX format. | Any Str |
409-
| oracledb.sql_id | The SQL ID of the query. | Any Str |
410-
| oracledb.child_number | The child number of the query. | Any Str |
411-
| oracledb.sid | ID of the Oracle Server session. | Any Str |
412-
| oracledb.serial | Serial number associated with a session. | Any Str |
413-
| oracledb.process | The operating system process ID (PID) associated with a session. | Any Str |
414-
| oracledb.schemaname | Oracle schema under which SQL statements are being executed | Any Str |
415-
| oracledb.program | Name of the client program or tool that initiated the Oracle database session. | Any Str |
416-
| oracledb.module | Logical module name of the client application that initiated a query or session. | Any Str |
417-
| oracledb.status | Execution state or result of a database query or session. | Any Str |
418-
| oracledb.state | Current state of the query or the session executing it. | Any Str |
419-
| oracledb.wait_class | The category of wait events a query or session is currently experiencing in Oracle Database. | Any Str |
420-
| oracledb.event | The specific wait event that a query or session is currently experiencing. | Any Str |
421-
| oracledb.object_name | Name of the database object that a query is accessing. | Any Str |
422-
| oracledb.object_type | Type of the database object that a query is accessing. | Any Str |
423-
| oracledb.osuser | Name of the operating system user that initiated or is running the Oracle database session. | Any Str |
424-
| oracledb.duration_sec | Total time taken by a database query to execute. | Any Double |
425-
426392
### db.server.top_query
427393
428394
top query

receiver/oracledbreceiver/factory.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ func createDefaultConfig() component.Config {
4444
ControllerConfig: cfg,
4545
MetricsBuilderConfig: metadata.DefaultMetricsBuilderConfig(),
4646
LogsBuilderConfig: metadata.DefaultLogsBuilderConfig(),
47-
QuerySample: QuerySample{
48-
MaxRowsPerQuery: 100,
49-
},
5047
TopQueryCollection: TopQueryCollection{
5148
MaxQuerySampleCount: 1000,
5249
TopQueryCount: 200,
@@ -123,7 +120,7 @@ func createLogsReceiverFunc(sqlOpenerFunc sqlOpenerFunc, clientProviderFunc clie
123120

124121
mp, err := newLogsScraper(logsBuilder, sqlCfg.LogsBuilderConfig, sqlCfg.ControllerConfig, settings.Logger, func() (*sql.DB, error) {
125122
return sqlOpenerFunc(getDataSource(*sqlCfg))
126-
}, clientProviderFunc, instanceName, metricCache, sqlCfg.TopQueryCollection, sqlCfg.QuerySample, hostName)
123+
}, clientProviderFunc, instanceName, metricCache, sqlCfg.TopQueryCollection, hostName)
127124
if err != nil {
128125
return nil, err
129126
}

receiver/oracledbreceiver/internal/metadata/generated_config.go

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/oracledbreceiver/internal/metadata/generated_logs.go

Lines changed: 0 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/oracledbreceiver/internal/metadata/generated_logs_test.go

Lines changed: 0 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/oracledbreceiver/internal/metadata/testdata/config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ all_set:
8484
oracledb.user_rollbacks:
8585
enabled: true
8686
events:
87-
db.server.query_sample:
88-
enabled: true
8987
db.server.top_query:
9088
enabled: true
9189
resource_attributes:
@@ -178,8 +176,6 @@ none_set:
178176
oracledb.user_rollbacks:
179177
enabled: false
180178
events:
181-
db.server.query_sample:
182-
enabled: false
183179
db.server.top_query:
184180
enabled: false
185181
resource_attributes:

0 commit comments

Comments
 (0)