From 6466bf5c03931cf0eb42e714b103f2d891dccde3 Mon Sep 17 00:00:00 2001
From: ko_oler <kooler89@gmail.com>
Date: Wed, 13 Nov 2024 15:44:43 +0300
Subject: [PATCH] fixes

---
 assets/templates/middleware/telemetry_content |  2 +-
 assets/templates/middleware/telemetry_default |  2 +-
 images/middleware/telemetry_middleware.go     |  4 +-
 logs/middleware/telemetry_middleware.go       |  8 ++--
 pkg/clients/middleware/logging_middleware.go  |  8 ++--
 .../middleware/telemetry_middleware.go        | 16 ++++----
 .../middleware/telemetry_middleware.go        | 12 +++---
 .../middleware/logging_middleware.go          |  6 +--
 .../middleware/telemetry_middleware.go        | 16 ++++----
 .../middleware/telemetry_middleware.go        | 18 ++++-----
 .../middleware/logging_middleware.go          | 12 +++---
 .../middleware/telemetry_middleware.go        | 18 ++++-----
 .../middleware/telemetry_middleware.go        | 18 ++++-----
 pkg/files/middleware/telemetry_middleware.go  | 16 ++++----
 .../middleware/telemetry_middleware.go        | 12 +++---
 pkg/items/middleware/telemetry_middleware.go  | 38 +++++++++----------
 pkg/locales/middleware/logging_middleware.go  |  4 +-
 .../middleware/telemetry_middleware.go        | 10 ++---
 .../middleware/telemetry_middleware.go        | 14 +++----
 .../middleware/logging_middleware.go          |  6 +--
 .../middleware/telemetry_middleware.go        | 12 +++---
 .../middleware/telemetry_middleware.go        |  6 +--
 pkg/roles/middleware/logging_middleware.go    |  6 +--
 pkg/roles/middleware/telemetry_middleware.go  | 12 +++---
 pkg/spaces/middleware/logging_middleware.go   | 16 ++++----
 pkg/spaces/middleware/telemetry_middleware.go | 26 ++++++-------
 pkg/users/middleware/logging_middleware.go    |  8 ++--
 pkg/users/middleware/telemetry_middleware.go  | 14 +++----
 28 files changed, 170 insertions(+), 170 deletions(-)

diff --git a/assets/templates/middleware/telemetry_content b/assets/templates/middleware/telemetry_content
index 7adcd36c..1b6bfb88 100644
--- a/assets/templates/middleware/telemetry_content
+++ b/assets/templates/middleware/telemetry_content
@@ -5,7 +5,7 @@ import (
     "git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
     "go.opentelemetry.io/otel"
     "go.opentelemetry.io/otel/attribute"
-    oid "git.perx.ru/perxis/perxis-go/id"
+    pkgId "git.perx.ru/perxis/perxis-go/id"
     otelmetric "go.opentelemetry.io/otel/metric"
     "go.opentelemetry.io/otel/trace"
 )
diff --git a/assets/templates/middleware/telemetry_default b/assets/templates/middleware/telemetry_default
index 6616504f..80be072a 100644
--- a/assets/templates/middleware/telemetry_default
+++ b/assets/templates/middleware/telemetry_default
@@ -5,7 +5,7 @@ import (
     "git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
     "go.opentelemetry.io/otel"
     "go.opentelemetry.io/otel/attribute"
-    oid "git.perx.ru/perxis/perxis-go/id"
+    pkgId "git.perx.ru/perxis/perxis-go/id"
     otelmetric "go.opentelemetry.io/otel/metric"
     "go.opentelemetry.io/otel/trace"
 )
diff --git a/images/middleware/telemetry_middleware.go b/images/middleware/telemetry_middleware.go
index 36d09a32..8eafa029 100644
--- a/images/middleware/telemetry_middleware.go
+++ b/images/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/images"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/files"
@@ -69,7 +69,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, source *files.File, opts
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/logs/middleware/telemetry_middleware.go b/logs/middleware/telemetry_middleware.go
index 37313863..c85083ee 100644
--- a/logs/middleware/telemetry_middleware.go
+++ b/logs/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/logs"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
@@ -69,7 +69,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, filter *logs.Filter) (
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -108,7 +108,7 @@ func (_d telemetryMiddleware) Find(ctx context.Context, filter *logs.Filter, opt
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -149,7 +149,7 @@ func (_d telemetryMiddleware) Log(ctx context.Context, entries []*logs.Entry) (e
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/clients/middleware/logging_middleware.go b/pkg/clients/middleware/logging_middleware.go
index 6e27e5c5..2a00b4cf 100644
--- a/pkg/clients/middleware/logging_middleware.go
+++ b/pkg/clients/middleware/logging_middleware.go
@@ -3,7 +3,7 @@ package middleware
 import (
 	"context"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/clients"
 	logzap "git.perx.ru/perxis/perxis-go/zap"
 	"go.uber.org/zap"
@@ -43,7 +43,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, client *clients.Client)
 func (m *loggingMiddleware) Get(ctx context.Context, spaceId, id string) (client *clients.Client, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewClientId(spaceId, id)),
+		logzap.Object(pkgId.NewClientId(spaceId, id)),
 	)
 
 	client, err = m.next.Get(ctx, spaceId, id)
@@ -105,7 +105,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, spaceId, id string) (err
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(clients.EventDelete),
-		logzap.Object(oid.NewClientId(spaceId, id)),
+		logzap.Object(pkgId.NewClientId(spaceId, id)),
 	)
 
 	err = m.next.Delete(ctx, spaceId, id)
@@ -131,7 +131,7 @@ func (m *loggingMiddleware) Enable(ctx context.Context, spaceId, id string, enab
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(event),
-		logzap.Object(oid.NewClientId(spaceId, id)),
+		logzap.Object(pkgId.NewClientId(spaceId, id)),
 	)
 
 	err = m.next.Enable(ctx, spaceId, id, enable)
diff --git a/pkg/clients/middleware/telemetry_middleware.go b/pkg/clients/middleware/telemetry_middleware.go
index cbb21715..8925db9d 100644
--- a/pkg/clients/middleware/telemetry_middleware.go
+++ b/pkg/clients/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/clients"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -84,7 +84,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, client *clients.Client
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -129,7 +129,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, spaceId string, id str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -174,7 +174,7 @@ func (_d telemetryMiddleware) Enable(ctx context.Context, spaceId string, id str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -220,7 +220,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, id string
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -266,7 +266,7 @@ func (_d telemetryMiddleware) GetBy(ctx context.Context, spaceId string, params
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -312,7 +312,7 @@ func (_d telemetryMiddleware) List(ctx context.Context, spaceId string) (clients
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -368,7 +368,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, client *clients.Client
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/collaborators/middleware/telemetry_middleware.go b/pkg/collaborators/middleware/telemetry_middleware.go
index d4a6f56c..1e53c7e1 100644
--- a/pkg/collaborators/middleware/telemetry_middleware.go
+++ b/pkg/collaborators/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/collaborators"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -73,7 +73,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, subject s
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -119,7 +119,7 @@ func (_d telemetryMiddleware) ListCollaborators(ctx context.Context, spaceId str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -175,7 +175,7 @@ func (_d telemetryMiddleware) ListSpaces(ctx context.Context, subject string) (s
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -220,7 +220,7 @@ func (_d telemetryMiddleware) Remove(ctx context.Context, spaceId string, subjec
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -265,7 +265,7 @@ func (_d telemetryMiddleware) Set(ctx context.Context, spaceId string, subject s
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/collections/middleware/logging_middleware.go b/pkg/collections/middleware/logging_middleware.go
index 5d8d104d..459a6627 100644
--- a/pkg/collections/middleware/logging_middleware.go
+++ b/pkg/collections/middleware/logging_middleware.go
@@ -3,7 +3,7 @@ package middleware
 import (
 	"context"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/collections"
 	"git.perx.ru/perxis/perxis-go/pkg/schema"
 	logzap "git.perx.ru/perxis/perxis-go/zap"
@@ -48,7 +48,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, spaceId string, envId st
 	logger := m.logger.With(
 		logzap.Caller(ctx, logzap.WithSpace(spaceId)),
 		logzap.Event(collections.EventDelete),
-		logzap.Object(oid.NewCollectionId(spaceId, envId, id)),
+		logzap.Object(pkgId.NewCollectionId(spaceId, envId, id)),
 	)
 
 	err = m.next.Delete(ctx, spaceId, envId, id)
@@ -93,7 +93,7 @@ func (m *loggingMiddleware) SetSchema(ctx context.Context, spaceId string, envId
 	logger := m.logger.With(
 		logzap.Caller(ctx, logzap.WithSpace(spaceId)),
 		logzap.Event(collections.EventSetSchema),
-		logzap.Object(oid.NewCollectionId(spaceId, envId, id)),
+		logzap.Object(pkgId.NewCollectionId(spaceId, envId, id)),
 	)
 
 	err = m.next.SetSchema(ctx, spaceId, envId, id, schema)
diff --git a/pkg/collections/middleware/telemetry_middleware.go b/pkg/collections/middleware/telemetry_middleware.go
index 044720ff..dba2f343 100644
--- a/pkg/collections/middleware/telemetry_middleware.go
+++ b/pkg/collections/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/collections"
 	"git.perx.ru/perxis/perxis-go/pkg/schema"
@@ -85,7 +85,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, coll *collections.Coll
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -130,7 +130,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, spaceId string, envId
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -176,7 +176,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, envId str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -224,7 +224,7 @@ func (_d telemetryMiddleware) List(ctx context.Context, spaceId string, envId st
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -271,7 +271,7 @@ func (_d telemetryMiddleware) SetSchema(ctx context.Context, spaceId string, env
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -318,7 +318,7 @@ func (_d telemetryMiddleware) SetState(ctx context.Context, spaceId string, envI
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -376,7 +376,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, coll *collections.Coll
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/delivery/middleware/telemetry_middleware.go b/pkg/delivery/middleware/telemetry_middleware.go
index 600b6a61..276d3f62 100644
--- a/pkg/delivery/middleware/telemetry_middleware.go
+++ b/pkg/delivery/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/collections"
 	"git.perx.ru/perxis/perxis-go/pkg/delivery"
@@ -77,7 +77,7 @@ func (_d telemetryMiddleware) Aggregate(ctx context.Context, spaceId string, env
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -126,7 +126,7 @@ func (_d telemetryMiddleware) FindItems(ctx context.Context, spaceId string, env
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -176,7 +176,7 @@ func (_d telemetryMiddleware) GetCollection(ctx context.Context, spaceId string,
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -223,7 +223,7 @@ func (_d telemetryMiddleware) GetEnvironment(ctx context.Context, spaceId string
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -269,7 +269,7 @@ func (_d telemetryMiddleware) GetItem(ctx context.Context, spaceId string, envId
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -318,7 +318,7 @@ func (_d telemetryMiddleware) ListCollections(ctx context.Context, spaceId strin
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -364,7 +364,7 @@ func (_d telemetryMiddleware) ListEnvironments(ctx context.Context, spaceId stri
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -409,7 +409,7 @@ func (_d telemetryMiddleware) ListLocales(ctx context.Context, spaceId string) (
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/environments/middleware/logging_middleware.go b/pkg/environments/middleware/logging_middleware.go
index faac106d..86a73c2a 100644
--- a/pkg/environments/middleware/logging_middleware.go
+++ b/pkg/environments/middleware/logging_middleware.go
@@ -4,7 +4,7 @@ import (
 	"context"
 	"fmt"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/environments"
 
 	logzap "git.perx.ru/perxis/perxis-go/zap"
@@ -46,7 +46,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, spaceId string, id strin
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(environments.EventDelete),
-		logzap.Object(oid.NewEnvironmentId(spaceId, id)),
+		logzap.Object(pkgId.NewEnvironmentId(spaceId, id)),
 	)
 
 	err = m.next.Delete(ctx, spaceId, id)
@@ -63,7 +63,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, spaceId string, id strin
 func (m *loggingMiddleware) Get(ctx context.Context, spaceId string, id string) (env *environments.Environment, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewEnvironmentId(spaceId, id)),
+		logzap.Object(pkgId.NewEnvironmentId(spaceId, id)),
 	)
 
 	env, err = m.next.Get(ctx, spaceId, id)
@@ -93,7 +93,7 @@ func (m *loggingMiddleware) Migrate(ctx context.Context, spaceId string, id stri
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(environments.EventMigrate),
-		logzap.Object(oid.NewEnvironmentId(spaceId, id)),
+		logzap.Object(pkgId.NewEnvironmentId(spaceId, id)),
 	)
 
 	err = m.next.Migrate(ctx, spaceId, id, options...)
@@ -111,7 +111,7 @@ func (m *loggingMiddleware) RemoveAlias(ctx context.Context, spaceId string, id
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(environments.EventUpdate),
-		logzap.Object(oid.NewEnvironmentId(spaceId, id)),
+		logzap.Object(pkgId.NewEnvironmentId(spaceId, id)),
 	)
 
 	err = m.next.RemoveAlias(ctx, spaceId, id, alias)
@@ -128,7 +128,7 @@ func (m *loggingMiddleware) SetAlias(ctx context.Context, spaceId string, id str
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(environments.EventUpdate),
-		logzap.Object(oid.NewEnvironmentId(spaceId, id)),
+		logzap.Object(pkgId.NewEnvironmentId(spaceId, id)),
 	)
 
 	err = m.next.SetAlias(ctx, spaceId, id, alias)
diff --git a/pkg/environments/middleware/telemetry_middleware.go b/pkg/environments/middleware/telemetry_middleware.go
index 279bbb8d..94c90c2f 100644
--- a/pkg/environments/middleware/telemetry_middleware.go
+++ b/pkg/environments/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/environments"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -84,7 +84,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, env *environments.Envi
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -129,7 +129,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, spaceId string, id str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -174,7 +174,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, id string
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -220,7 +220,7 @@ func (_d telemetryMiddleware) List(ctx context.Context, spaceId string) (envs []
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -265,7 +265,7 @@ func (_d telemetryMiddleware) Migrate(ctx context.Context, spaceId string, id st
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -311,7 +311,7 @@ func (_d telemetryMiddleware) RemoveAlias(ctx context.Context, spaceId string, i
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -357,7 +357,7 @@ func (_d telemetryMiddleware) SetAlias(ctx context.Context, spaceId string, id s
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -414,7 +414,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, env *environments.Envi
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/extension/middleware/telemetry_middleware.go b/pkg/extension/middleware/telemetry_middleware.go
index 7302cab3..10349b31 100644
--- a/pkg/extension/middleware/telemetry_middleware.go
+++ b/pkg/extension/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/extension"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -68,7 +68,7 @@ func (_d telemetryMiddleware) Action(ctx context.Context, in *extension.ActionRe
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -108,7 +108,7 @@ func (_d telemetryMiddleware) Check(ctx context.Context, in *extension.CheckRequ
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -147,7 +147,7 @@ func (_d telemetryMiddleware) Install(ctx context.Context, in *extension.Install
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -186,7 +186,7 @@ func (_d telemetryMiddleware) ListExtensions(ctx context.Context, space string,
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -228,7 +228,7 @@ func (_d telemetryMiddleware) ListRegisteredExtensions(ctx context.Context, exte
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -268,7 +268,7 @@ func (_d telemetryMiddleware) RegisterExtensions(ctx context.Context, ext ...*ex
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -307,7 +307,7 @@ func (_d telemetryMiddleware) Uninstall(ctx context.Context, in *extension.Unins
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -346,7 +346,7 @@ func (_d telemetryMiddleware) UnregisterExtensions(ctx context.Context, ext ...*
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/files/middleware/telemetry_middleware.go b/pkg/files/middleware/telemetry_middleware.go
index e2e482a6..156f9d8b 100644
--- a/pkg/files/middleware/telemetry_middleware.go
+++ b/pkg/files/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/files"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -68,7 +68,7 @@ func (_d telemetryMiddleware) AbortUpload(ctx context.Context, upload *files.Mul
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -107,7 +107,7 @@ func (_d telemetryMiddleware) CompleteUpload(ctx context.Context, upload *files.
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -147,7 +147,7 @@ func (_d telemetryMiddleware) DeleteFile(ctx context.Context, file *files.File)
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -186,7 +186,7 @@ func (_d telemetryMiddleware) GetFile(ctx context.Context, file *files.File) (f
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -226,7 +226,7 @@ func (_d telemetryMiddleware) MoveUpload(ctx context.Context, upload *files.Mult
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -266,7 +266,7 @@ func (_d telemetryMiddleware) StartUpload(ctx context.Context, upload *files.Mul
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -306,7 +306,7 @@ func (_d telemetryMiddleware) Upload(ctx context.Context, file *files.File) (u *
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/invitations/middleware/telemetry_middleware.go b/pkg/invitations/middleware/telemetry_middleware.go
index 1696f81a..a80140c1 100644
--- a/pkg/invitations/middleware/telemetry_middleware.go
+++ b/pkg/invitations/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/invitations"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
@@ -85,7 +85,7 @@ func (_d telemetryMiddleware) Accept(ctx context.Context, invitationId string, u
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -141,7 +141,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, invitation *invitation
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -197,7 +197,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, invitationId string) (
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -252,7 +252,7 @@ func (_d telemetryMiddleware) Find(ctx context.Context, filter *invitations.Filt
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -310,7 +310,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, invitationId string) (inv
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/items/middleware/telemetry_middleware.go b/pkg/items/middleware/telemetry_middleware.go
index da626aa5..16a415bd 100644
--- a/pkg/items/middleware/telemetry_middleware.go
+++ b/pkg/items/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/items"
 	"git.perx.ru/perxis/perxis-go/pkg/schema"
@@ -74,7 +74,7 @@ func (_d telemetryMiddleware) Aggregate(ctx context.Context, spaceId string, env
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -123,7 +123,7 @@ func (_d telemetryMiddleware) AggregatePublished(ctx context.Context, spaceId st
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -183,7 +183,7 @@ func (_d telemetryMiddleware) Archive(ctx context.Context, item *items.Item, opt
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -239,7 +239,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, item *items.Item, opts
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -296,7 +296,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, item *items.Item, opti
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -341,7 +341,7 @@ func (_d telemetryMiddleware) Find(ctx context.Context, spaceId string, envId st
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -391,7 +391,7 @@ func (_d telemetryMiddleware) FindArchived(ctx context.Context, spaceId string,
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -441,7 +441,7 @@ func (_d telemetryMiddleware) FindPublished(ctx context.Context, spaceId string,
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -491,7 +491,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, envId str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -540,7 +540,7 @@ func (_d telemetryMiddleware) GetPublished(ctx context.Context, spaceId string,
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -589,7 +589,7 @@ func (_d telemetryMiddleware) GetRevision(ctx context.Context, spaceId string, e
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -650,7 +650,7 @@ func (_d telemetryMiddleware) Introspect(ctx context.Context, item *items.Item,
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -697,7 +697,7 @@ func (_d telemetryMiddleware) ListRevisions(ctx context.Context, spaceId string,
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -757,7 +757,7 @@ func (_d telemetryMiddleware) Publish(ctx context.Context, item *items.Item, opt
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -813,7 +813,7 @@ func (_d telemetryMiddleware) Unarchive(ctx context.Context, item *items.Item, o
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -869,7 +869,7 @@ func (_d telemetryMiddleware) Undelete(ctx context.Context, item *items.Item, op
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -925,7 +925,7 @@ func (_d telemetryMiddleware) Unpublish(ctx context.Context, item *items.Item, o
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -981,7 +981,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, item *items.Item, opti
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/locales/middleware/logging_middleware.go b/pkg/locales/middleware/logging_middleware.go
index 47c69744..22ea6a82 100644
--- a/pkg/locales/middleware/logging_middleware.go
+++ b/pkg/locales/middleware/logging_middleware.go
@@ -3,7 +3,7 @@ package middleware
 import (
 	"context"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/locales"
 	logzap "git.perx.ru/perxis/perxis-go/zap"
 	"go.uber.org/zap"
@@ -74,7 +74,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, spaceId, id string) (err
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(locales.EventDelete),
-		logzap.Object(oid.NewLocaleId(spaceId, id)),
+		logzap.Object(pkgId.NewLocaleId(spaceId, id)),
 	)
 
 	err = m.next.Delete(ctx, spaceId, id)
diff --git a/pkg/locales/middleware/telemetry_middleware.go b/pkg/locales/middleware/telemetry_middleware.go
index 971f2c29..8016481d 100644
--- a/pkg/locales/middleware/telemetry_middleware.go
+++ b/pkg/locales/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/locales"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -84,7 +84,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, locale *locales.Locale
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -129,7 +129,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, spaceId string, id str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -174,7 +174,7 @@ func (_d telemetryMiddleware) List(ctx context.Context, spaceId string) (locales
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -230,7 +230,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, locale *locales.Locale
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/members/middleware/telemetry_middleware.go b/pkg/members/middleware/telemetry_middleware.go
index bf339f3f..04dc47d3 100644
--- a/pkg/members/middleware/telemetry_middleware.go
+++ b/pkg/members/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/members"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -68,7 +68,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, orgId string, userId stri
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -109,7 +109,7 @@ func (_d telemetryMiddleware) ListMembers(ctx context.Context, orgId string) (me
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -149,7 +149,7 @@ func (_d telemetryMiddleware) ListOrganizations(ctx context.Context, userId stri
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -189,7 +189,7 @@ func (_d telemetryMiddleware) Remove(ctx context.Context, orgId string, userId s
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -229,7 +229,7 @@ func (_d telemetryMiddleware) RemoveAll(ctx context.Context, orgId string) (err
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -268,7 +268,7 @@ func (_d telemetryMiddleware) Set(ctx context.Context, orgId string, userId stri
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/organizations/middleware/logging_middleware.go b/pkg/organizations/middleware/logging_middleware.go
index a3550ab1..ae3481ae 100644
--- a/pkg/organizations/middleware/logging_middleware.go
+++ b/pkg/organizations/middleware/logging_middleware.go
@@ -3,7 +3,7 @@ package middleware
 import (
 	"context"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/organizations"
 
 	"git.perx.ru/perxis/perxis-go/pkg/options"
@@ -46,7 +46,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, id string) (err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(organizations.EventDelete),
-		logzap.Object(oid.NewOrganizationId(id)),
+		logzap.Object(pkgId.NewOrganizationId(id)),
 	)
 
 	err = m.next.Delete(ctx, id)
@@ -77,7 +77,7 @@ func (m *loggingMiddleware) Find(ctx context.Context, filter *organizations.Filt
 func (m *loggingMiddleware) Get(ctx context.Context, id string) (org *organizations.Organization, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewOrganizationId(id)),
+		logzap.Object(pkgId.NewOrganizationId(id)),
 	)
 
 	org, err = m.next.Get(ctx, id)
diff --git a/pkg/organizations/middleware/telemetry_middleware.go b/pkg/organizations/middleware/telemetry_middleware.go
index 27c920d4..ae945b47 100644
--- a/pkg/organizations/middleware/telemetry_middleware.go
+++ b/pkg/organizations/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
 	"git.perx.ru/perxis/perxis-go/pkg/organizations"
@@ -69,7 +69,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, org *organizations.Org
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -109,7 +109,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, id string) (err error)
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -148,7 +148,7 @@ func (_d telemetryMiddleware) Find(ctx context.Context, filter *organizations.Fi
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -190,7 +190,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, id string) (org *organiza
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -230,7 +230,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, org *organizations.Org
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/references/middleware/telemetry_middleware.go b/pkg/references/middleware/telemetry_middleware.go
index 3e8fbb77..76eab9b3 100644
--- a/pkg/references/middleware/telemetry_middleware.go
+++ b/pkg/references/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/items"
 	"git.perx.ru/perxis/perxis-go/pkg/references"
@@ -74,7 +74,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, envId str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -123,7 +123,7 @@ func (_d telemetryMiddleware) Publish(ctx context.Context, spaceId string, envId
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/roles/middleware/logging_middleware.go b/pkg/roles/middleware/logging_middleware.go
index 8c1d4916..ed480ab7 100644
--- a/pkg/roles/middleware/logging_middleware.go
+++ b/pkg/roles/middleware/logging_middleware.go
@@ -3,7 +3,7 @@ package middleware
 import (
 	"context"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/roles"
 	logzap "git.perx.ru/perxis/perxis-go/zap"
 	"go.uber.org/zap"
@@ -43,7 +43,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, role *roles.Role) (creat
 func (m *loggingMiddleware) Get(ctx context.Context, spaceId, id string) (role *roles.Role, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewRoleId(spaceId, id)),
+		logzap.Object(pkgId.NewRoleId(spaceId, id)),
 	)
 
 	role, err = m.next.Get(ctx, spaceId, id)
@@ -91,7 +91,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, spaceId, id string) (err
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(roles.EventDelete),
-		logzap.Object(oid.NewRoleId(spaceId, id)),
+		logzap.Object(pkgId.NewRoleId(spaceId, id)),
 	)
 
 	err = m.next.Delete(ctx, spaceId, id)
diff --git a/pkg/roles/middleware/telemetry_middleware.go b/pkg/roles/middleware/telemetry_middleware.go
index cdb71b1f..cf5fe951 100644
--- a/pkg/roles/middleware/telemetry_middleware.go
+++ b/pkg/roles/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/roles"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -84,7 +84,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, role *roles.Role) (cre
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -129,7 +129,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, spaceId string, id str
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -174,7 +174,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string, id string
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -220,7 +220,7 @@ func (_d telemetryMiddleware) List(ctx context.Context, spaceId string) (roles [
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -276,7 +276,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, role *roles.Role) (err
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/spaces/middleware/logging_middleware.go b/pkg/spaces/middleware/logging_middleware.go
index 9ff01f30..9ef74b51 100644
--- a/pkg/spaces/middleware/logging_middleware.go
+++ b/pkg/spaces/middleware/logging_middleware.go
@@ -4,7 +4,7 @@ import (
 	"context"
 	"fmt"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
 	"git.perx.ru/perxis/perxis-go/pkg/spaces"
 
@@ -30,7 +30,7 @@ func (m *loggingMiddleware) AbortTransfer(ctx context.Context, id string) (err e
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(spaces.EventAbortTransfer),
-		logzap.Object(oid.NewSpaceId(id)),
+		logzap.Object(pkgId.NewSpaceId(id)),
 	)
 
 	err = m.next.AbortTransfer(ctx, id)
@@ -70,7 +70,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, id string) (err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(spaces.EventDelete),
-		logzap.Object(oid.NewOrganizationId(space.OrgID)),
+		logzap.Object(pkgId.NewOrganizationId(space.OrgID)),
 	)
 
 	err = m.next.Delete(ctx, id)
@@ -87,7 +87,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, id string) (err error) {
 func (m *loggingMiddleware) Get(ctx context.Context, spaceId string) (space *spaces.Space, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewSpaceId(spaceId)),
+		logzap.Object(pkgId.NewSpaceId(spaceId)),
 	)
 
 	space, err = m.next.Get(ctx, spaceId)
@@ -145,7 +145,7 @@ func (m *loggingMiddleware) Move(ctx context.Context, id string, orgID string) (
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(spaces.EventMove),
-		logzap.Object(oid.NewSpaceId(id)),
+		logzap.Object(pkgId.NewSpaceId(id)),
 	)
 
 	err = m.next.Move(ctx, id, orgID)
@@ -163,7 +163,7 @@ func (m *loggingMiddleware) Transfer(ctx context.Context, id string, transferToO
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(spaces.EventTransfer),
-		logzap.Object(oid.NewSpaceId(id)),
+		logzap.Object(pkgId.NewSpaceId(id)),
 	)
 
 	err = m.next.Transfer(ctx, id, transferToOrg)
@@ -199,7 +199,7 @@ func (m *loggingMiddleware) SetState(ctx context.Context, id string, state *spac
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(spaces.EventUpdate),
-		logzap.Object(oid.NewSpaceId(id)),
+		logzap.Object(pkgId.NewSpaceId(id)),
 	)
 
 	var st spaces.State
@@ -221,7 +221,7 @@ func (m *loggingMiddleware) UpdateConfig(ctx context.Context, id string, config
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(spaces.EventUpdateConfig),
-		logzap.Object(oid.NewSpaceId(id)),
+		logzap.Object(pkgId.NewSpaceId(id)),
 	)
 
 	err = m.next.UpdateConfig(ctx, id, config)
diff --git a/pkg/spaces/middleware/telemetry_middleware.go b/pkg/spaces/middleware/telemetry_middleware.go
index 66f52519..acad14fe 100644
--- a/pkg/spaces/middleware/telemetry_middleware.go
+++ b/pkg/spaces/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
 	"git.perx.ru/perxis/perxis-go/pkg/spaces"
@@ -85,7 +85,7 @@ func (_d telemetryMiddleware) AbortTransfer(ctx context.Context, id string) (err
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -140,7 +140,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, space *spaces.Space) (
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -196,7 +196,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, id string) (err error)
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -251,7 +251,7 @@ func (_d telemetryMiddleware) Find(ctx context.Context, filter *spaces.Filter, f
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -309,7 +309,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, id string) (space *spaces
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -365,7 +365,7 @@ func (_d telemetryMiddleware) List(ctx context.Context, orgId string) (spaces []
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -421,7 +421,7 @@ func (_d telemetryMiddleware) ListTransfers(ctx context.Context, orgId string) (
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -477,7 +477,7 @@ func (_d telemetryMiddleware) Move(ctx context.Context, id string, orgId string)
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -533,7 +533,7 @@ func (_d telemetryMiddleware) SetState(ctx context.Context, id string, state *sp
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -589,7 +589,7 @@ func (_d telemetryMiddleware) Transfer(ctx context.Context, id string, transferT
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -645,7 +645,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, space *spaces.Space) (
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -700,7 +700,7 @@ func (_d telemetryMiddleware) UpdateConfig(ctx context.Context, id string, confi
 	if spID != "" {
 		att = append(att, attribute.String("spaceID", spID))
 	}
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
diff --git a/pkg/users/middleware/logging_middleware.go b/pkg/users/middleware/logging_middleware.go
index 46c322a3..8c609a74 100644
--- a/pkg/users/middleware/logging_middleware.go
+++ b/pkg/users/middleware/logging_middleware.go
@@ -3,7 +3,7 @@ package middleware
 import (
 	"context"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
 	"git.perx.ru/perxis/perxis-go/pkg/users"
 	logzap "git.perx.ru/perxis/perxis-go/zap"
@@ -44,7 +44,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, user *users.User) (creat
 func (m *loggingMiddleware) Get(ctx context.Context, id string) (user *users.User, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewUserId(id)),
+		logzap.Object(pkgId.NewUserId(id)),
 	)
 
 	user, err = m.next.Get(ctx, id)
@@ -92,7 +92,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, id string) (err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
 		logzap.Event(users.EventDelete),
-		logzap.Object(oid.NewUserId(id)),
+		logzap.Object(pkgId.NewUserId(id)),
 	)
 
 	err = m.next.Delete(ctx, id)
@@ -109,7 +109,7 @@ func (m *loggingMiddleware) Delete(ctx context.Context, id string) (err error) {
 func (m *loggingMiddleware) GetByIdentity(ctx context.Context, identity string) (user *users.User, err error) {
 	logger := m.logger.With(
 		logzap.Caller(ctx),
-		logzap.Object(oid.NewUserId(identity)),
+		logzap.Object(pkgId.NewUserId(identity)),
 	)
 
 	user, err = m.next.GetByIdentity(ctx, identity)
diff --git a/pkg/users/middleware/telemetry_middleware.go b/pkg/users/middleware/telemetry_middleware.go
index 0553ad2b..25088bfd 100644
--- a/pkg/users/middleware/telemetry_middleware.go
+++ b/pkg/users/middleware/telemetry_middleware.go
@@ -10,7 +10,7 @@ import (
 	"context"
 	"time"
 
-	oid "git.perx.ru/perxis/perxis-go/id"
+	pkgId "git.perx.ru/perxis/perxis-go/id"
 	"git.perx.ru/perxis/perxis-go/pkg/auth"
 	"git.perx.ru/perxis/perxis-go/pkg/options"
 	"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
@@ -69,7 +69,7 @@ func (_d telemetryMiddleware) Create(ctx context.Context, user *users.User) (cre
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -109,7 +109,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, id string) (err error)
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -148,7 +148,7 @@ func (_d telemetryMiddleware) Find(ctx context.Context, filter *users.Filter, op
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -190,7 +190,7 @@ func (_d telemetryMiddleware) Get(ctx context.Context, id string) (user *users.U
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -230,7 +230,7 @@ func (_d telemetryMiddleware) GetByIdentity(ctx context.Context, identity string
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
@@ -270,7 +270,7 @@ func (_d telemetryMiddleware) Update(ctx context.Context, user *users.User) (err
 
 	_d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes)
 
-	caller, _ := oid.NewObjectId(auth.GetPrincipal(ctx))
+	caller, _ := pkgId.NewObjectId(auth.GetPrincipal(ctx))
 	if caller != nil {
 		att = append(att, attribute.String("caller", caller.String()))
 	}
-- 
GitLab