Skip to content

Commit

Permalink
DEVPROD-13165 Add expanded remote path to otel for s3 commands (#8598)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZackarySantana authored Jan 8, 2025
1 parent 4f10f6a commit de4bd8b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions agent/command/s3_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var (
s3GetBucketAttribute = fmt.Sprintf("%s.bucket", s3GetAttribute)
s3GetTemporaryCredentialsAttribute = fmt.Sprintf("%s.temporary_credentials", s3GetAttribute)
s3GetRemoteFileAttribute = fmt.Sprintf("%s.remote_file", s3GetAttribute)
s3GetExpandedRemoteFileAttribute = fmt.Sprintf("%s.expanded_remote_file", s3GetAttribute)
)

// s3get is a command to fetch a resource from an S3 bucket and download it to
Expand Down Expand Up @@ -181,6 +182,7 @@ func (c *s3get) Execute(ctx context.Context,
attribute.String(s3GetBucketAttribute, c.Bucket),
attribute.Bool(s3GetTemporaryCredentialsAttribute, c.AwsSessionToken != ""),
attribute.String(s3GetRemoteFileAttribute, c.remoteFile),
attribute.String(s3GetExpandedRemoteFileAttribute, c.RemoteFile),
)

// create pail bucket
Expand Down
6 changes: 4 additions & 2 deletions agent/command/s3_put.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var (
s3PutTemporaryCredentialsAttribute = fmt.Sprintf("%s.temporary_credentials", s3PutAttribute)
s3PutVisibilityAttribute = fmt.Sprintf("%s.visibility", s3PutAttribute)
s3PutPermissionsAttribute = fmt.Sprintf("%s.permissions", s3PutAttribute)
s3PutRemotePathAttribute = fmt.Sprintf("%s.remote_path", s3PutAttribute)
s3PutRemoteFileAttribute = fmt.Sprintf("%s.remote_file", s3PutAttribute)
s3PutExpandedRemoteFileAttribute = fmt.Sprintf("%s.expanded_remote_file", s3PutAttribute)
)

// s3pc is a command to put a resource to an S3 bucket and download it to
Expand Down Expand Up @@ -310,7 +311,8 @@ func (s3pc *s3put) Execute(ctx context.Context,
attribute.Bool(s3PutTemporaryCredentialsAttribute, s3pc.AwsSessionToken != ""),
attribute.String(s3PutVisibilityAttribute, s3pc.Visibility),
attribute.String(s3PutPermissionsAttribute, s3pc.Permissions),
attribute.String(s3PutRemotePathAttribute, s3pc.remoteFile),
attribute.String(s3PutRemoteFileAttribute, s3pc.remoteFile),
attribute.String(s3PutExpandedRemoteFileAttribute, s3pc.RemoteFile),
)

s3pc.internalBuckets = conf.InternalBuckets
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var (

// Agent version to control agent rollover. The format is the calendar date
// (YYYY-MM-DD).
AgentVersion = "2025-01-02"
AgentVersion = "2025-01-07"
)

const (
Expand Down

0 comments on commit de4bd8b

Please sign in to comment.